03.06.2015, 01:32
I know what this warning means, but I shouldn't be getting it.
In an /ame command:
I know it shouldn't be 500, it should be 124 (which I got from 128 - 5 ("/ame ") and + the null terminator) but I changed it to 500 to see if it actually was a problem with the string length being too small.
However, I still get "sscanf warning: String buffer overflow.", I tested how many characters it takes to set off the warning and it's as soon as I type anything above "/ame iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii". So anything over 97 characters.
(ignore the space in the i's, no idea why the forums added that but I can't get rid of it)
Does anyone know why this is?
In an /ame command:
pawn Код:
new action[500];
if(sscanf(params, "s[500]", action))
However, I still get "sscanf warning: String buffer overflow.", I tested how many characters it takes to set off the warning and it's as soon as I type anything above "/ame iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii". So anything over 97 characters.
(ignore the space in the i's, no idea why the forums added that but I can't get rid of it)
Does anyone know why this is?