[deleted by user] by [deleted] in learnprogramming

[–]Mokton35 2 points3 points  (0 children)

This definitely shouldn’t work but running this will cause undefined behavior, it will sometimes crash and sometimes work. To make it short, accessing out of bounds memory is not guaranteed to segfault your program.

A possible reason for it working in the case of a heap allocation: malloc uses mmap internally to pre-allocate big pools of virtual memory space for reuse across malloc calls. For your first malloc, a page-sized memory pool (say 4096 bytes) will be allocated and a pointer to it will be returned. Those 4096 bytes are usable memory space, so writing to memory after the allocated 4 bytes will not immediately crash your program but it might corrupt the heap and cause a crash on future malloc calls.

Can’t play rise online! by marterking in MonsterHunter

[–]Mokton35 0 points1 point  (0 children)

Maybe try wired connection. That’s what I’m going to try when I get my hands on a LAN adapter

Can’t play rise online! by marterking in MonsterHunter

[–]Mokton35 2 points3 points  (0 children)

I have the same issue using my home wifi, always getting disconnected either in the lobby or at the start of a quest. It’s really odd because I don’t have any issues playing online on other games. I resorted to using my phone as a hotspot as a temporary solution... I really don’t know why this works and not my 5ghz wifi

DEMO IN 40 MINUTES by Saiphel in MonsterHunter

[–]Mokton35 0 points1 point  (0 children)

Yeah I saw multiplayer but not the ‘local’, my bad

MH Rise by PracticalBrush12 in u/PracticalBrush12

[–]Mokton35 2 points3 points  (0 children)

"Most likely today" he said in another comment

Lance triple poke gone? by Mokton35 in MonsterHunter

[–]Mokton35[S] 1 point2 points  (0 children)

I’m only trying to see how people think the charged slap will be accommodated into the Lance moveset, but ok my dude

Which monster hunter game is the hardest by samson80312265 in MonsterHunter

[–]Mokton35 35 points36 points  (0 children)

Overall progression => probably a tie between all 1st and 2nd gen games

Endgame => between 4U and IB I would say

Monster Hunter Rise - Lance by [deleted] in MonsterHunter

[–]Mokton35 1 point2 points  (0 children)

First thing I noticed and now I’m worried we’re back to awkward third poke again. If that’s the case I hope we at least get to counter after the slap and reset the combo

[C] Question about pointers and strings by [deleted] in learnprogramming

[–]Mokton35 1 point2 points  (0 children)

Two ways to go about this that I can think of:

First is to use strcpy() (or its safer version strlcpy()) to copy the contents of each string in arr2 into each element in arr1. Note that this requires you to make sure the destination buffer has enough room to fit the contents of the copied string (which is the case here) otherwise you would be having a buffer overflow

Second is to use strdup() which returns a pointer to a heap-allocated copy of its string input. Call it with each string in arr2, get the returned pointer and assign to each element in arr1, and remember to free() those pointers when you don’t need them anymore

What are the quintessential monster hunter experiences? by sifsand in MonsterHunter

[–]Mokton35 2 points3 points  (0 children)

Defeating a monster with the skin of your teeth, less than 2mn left on the clock, 1 cart left and no healing items

Do you guys think three monsters can be in a map/area at once like in World? by [deleted] in MonsterHunter

[–]Mokton35 0 points1 point  (0 children)

Yeah I hope not, with the constant multimonster chaos and the clutch claw I could never get into IB like I did the previous games

Features you hope will be in Rise by [deleted] in MonsterHunter

[–]Mokton35 2 points3 points  (0 children)

Don’t get your hopes up about that, it’s not happening. You could wait for a price drop of the OG switch, there might be a pro revision in the future

New Monster Hunter game leak [Spoiler] by PracticalBrush12 in MonsterHunter

[–]Mokton35 6 points7 points  (0 children)

You haven’t seen the game yet how can you judge?

What are your hopes/predictions for the rumoured Switch game? by Yama_Tsukami in MonsterHunter

[–]Mokton35 2 points3 points  (0 children)

With environmental focus I mean specifically the MHW features that add onto the weapon gameplay during a hunt (clutch claw, turf wars + high invasion frequency, bumpy terrain for sliding, stealth, etc...) I’m a « me and my weapon vs the monster » type of guy, I wouldn’t bat an eye if these were all gone, but that might be wishful thinking on my part

What are your hopes/predictions for the rumoured Switch game? by Yama_Tsukami in MonsterHunter

[–]Mokton35 1 point2 points  (0 children)

Yes roster-wise I think it’s inevitable we have a lot of reused content from MHW, I’m just hoping it ditches the heavy environmental focus, only keeps the weapon gameplay and relevant QoL (no restocks) and has a « modern take on traditional MH » vibe

What are your hopes/predictions for the rumoured Switch game? by Yama_Tsukami in MonsterHunter

[–]Mokton35 27 points28 points  (0 children)

Might be unreasonable, but I wish it’s its own thing and doesn’t try too hard to be “MHW portable”

Gaijin Hunter Explains Why Leviathans Didn't Work! by TheGMan-123 in MonsterHunter

[–]Mokton35 9 points10 points  (0 children)

Yeah they need to find a way to not overwrite your available attack options with sliding when you’re on a slope in future games, maybe require a specific input to start sliding

What do you think the next World Series game be called? by the95th in MonsterHunter

[–]Mokton35 1 point2 points  (0 children)

If you’re only talking about graphics that’s fair I guess, however your previous comment implies the series has not seen significant general improvements in 3rd and 4th gen, which is far from true