strmid has a bug
#2

You are not including the space required for the null terminator, which results in stack overflow. The arrays "ABC" and "DEF" should each be 4 cells wide to hold a string of length 3 + null terminator.

On another note, don't write variable names in all caps. By convention, all caps is reserved for constants (#define and const).
Reply


Messages In This Thread
strmid has a bug [Solved] - by liquor - 16.07.2015, 17:26
Re: strmid has a bug - by Vince - 16.07.2015, 17:29
Re: strmid has a bug - by liquor - 16.07.2015, 17:33
Re: strmid has a bug - by liquor - 16.07.2015, 17:42

Forum Jump:


Users browsing this thread: 1 Guest(s)