07.07.2013, 05:51
it always appear string buffer oveflow in the new name and loc
pawn Код:
if(!strcmp(option, "name", true, 4))
{
new name[32];
if(sscanf(params, "is[10]s[32]",i,option,name)) return SCM(playerid,-1, "[Usage]: /credit [robid] name [name]");
if(PickInfo[i][pPick] == 0) return SendClientMessage(playerid,-1, "Invalid door id.");
format(string, sizeof(string), " You have set rob ID %d's name to %s",i,name);
SCM(playerid,COLOR_LIGHTBLUE, string);
PickInfo[i][pRname] = name;
}
if(!strcmp(option, "location", true, 8))
{
new loc[32];
if(sscanf(params, "is[10]s[32]",i,option,loc)) return SCM(playerid,-1, "[Usage]: /credit [robid] location [loc]");
if(PickInfo[i][pPick] == 0) return SendClientMessage(playerid,-1, "Invalid door id.");
format(string, sizeof(string), " You have set rob ID %d's location to %s",i,loc);
SCM(playerid,COLOR_LIGHTBLUE, string);
PickInfo[i][pLoc] = loc;
}