mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
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];
|
char format[16];
|
||||||
format[0] = '%';
|
format[0] = '%';
|
||||||
char *ptr = format+1;
|
char *ptr = format+1;
|
||||||
if (*src == 's' || *src == 'd' || *src == 'f' || *src == 'i' || *src == 'g')
|
if (*src != '%')
|
||||||
{
|
{
|
||||||
while (*src != 0 && !isalpha(*ptr++ = *src++))
|
while (*src != 0 && !isalpha(*ptr++ = *src++))
|
||||||
/*nothing*/;
|
/*nothing*/;
|
||||||
@ -819,8 +819,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
*outptr++ = '%';
|
strcpy(outptr, format);
|
||||||
*outptr++ = *(ptr-1);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user