19.12.2011, 01:33
Let's suppose I have this:
Well, it's a command. So, anybody can use it. Now, if the string text overpass the string size, the sscanf plugin prints this warning: sscanf warning: string buffer overflow.
Now, is there a way to avoid it BEFORE parsing the string with sscanf? Or is it normal to do this warning? I can see that sscanf cuts the string at the point, but are the warnings bad? Or can I just live with it?
pawn Код:
CMD:whisper(playerid, params[])
{
new whisp[90];
if(sscanf(params, "us[90]", giveplayerid, whisp)) return SendClientMessage //Blahblahblah whatever
//Do something here
return 1;
}
Now, is there a way to avoid it BEFORE parsing the string with sscanf? Or is it normal to do this warning? I can see that sscanf cuts the string at the point, but are the warnings bad? Or can I just live with it?