fixed bug where expressions like %02d would not be evaluated correctly
This commit is contained in:
parent
bec1e418e7
commit
b33a53d258
@ -785,7 +785,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
||||
char format[16];
|
||||
format[0] = '%';
|
||||
char *ptr = format+1;
|
||||
if (*src == 's' || *src == 'd' || *src == 'f' || *src == 'i' || *src == 'g')
|
||||
if (*src != '%')
|
||||
{
|
||||
while (*src != 0 && !isalpha(*ptr++ = *src++))
|
||||
/*nothing*/;
|
||||
@ -819,8 +819,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
||||
}
|
||||
default:
|
||||
{
|
||||
*outptr++ = '%';
|
||||
*outptr++ = *(ptr-1);
|
||||
strcpy(outptr, format);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user