Mess up after update of my code
#2

ustr is way too small and strd too big

strd could be around 43
and ustr probably something close to 380
lstr could also be around 85 isntead of 400

just estimate the maximum size for each string, that'll help in the future too.
for example, something like this
pawn Код:
format(str,sizeof str,"hello %s!",name);
here it's

"hello " -> 6 chars
"%s" which equals to 24(max-name) -> 24 chars
"!" 1 char
'\0' 1cahr

so the optimal size of str would be 32
not too much adn not too less, just right.
Reply


Messages In This Thread
Mess up after update of my code - by LeXuZ - 02.01.2015, 15:51
AW: Mess up after update of my code - by CutX - 02.01.2015, 15:54
Re: Mess up after update of my code - by LeXuZ - 02.01.2015, 17:44
AW: Mess up after update of my code - by Flori - 02.01.2015, 18:04
Re: Mess up after update of my code - by LeXuZ - 04.01.2015, 13:05
Re: Mess up after update of my code - by Kwarde - 04.01.2015, 13:31
Re: Mess up after update of my code - by LeXuZ - 04.01.2015, 15:22

Forum Jump:


Users browsing this thread: 1 Guest(s)