strmid writing to wrong varible
#5

If string is 72 characters long you need 73 characters. Why?
First of all know that strings in PAWN are no different than an array. Basically those are the same:
pawn Код:
new str[] = "Hello";
// same as
new str[] = { 'H', 'e', 'l', 'l', 'o', '\0' };
Notice that '\0'. All string functions depend on it to know when the string ends. So, if you overwrite it with a character, printf for example does not know that string ended and reads memory until it meets '\0'. In your case, from eEmail

#e: Damn internet outage
Reply


Messages In This Thread
strmid writing to wrong varible - by wallee - 06.09.2017, 05:10
Re: strmid writing to wrong varible - by nG Inverse - 06.09.2017, 05:43
Re: strmid writing to wrong varible - by wallee - 06.09.2017, 07:13
Re: strmid writing to wrong varible - by Vince - 06.09.2017, 08:25
Re: strmid writing to wrong varible - by Misiur - 06.09.2017, 08:32
Re: strmid writing to wrong varible - by wallee - 06.09.2017, 20:13
Re: strmid writing to wrong varible - by wallee - 07.09.2017, 02:31
Re: strmid writing to wrong varible - by Paulice - 07.09.2017, 04:17
Re: strmid writing to wrong varible - by wallee - 07.09.2017, 19:21

Forum Jump:


Users browsing this thread: 1 Guest(s)