Added special cases for %% and % at end of phrase for formatting of phrases defined in language definition files.
This commit is contained in:
parent
8761791473
commit
cc4bbadfa2
|
@ -584,9 +584,17 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||
if (*def == '%')
|
||||
{
|
||||
++def;
|
||||
if (*def == '%' || *def == 0)
|
||||
{
|
||||
*outptr++ = '%';
|
||||
++def;
|
||||
}
|
||||
else
|
||||
{
|
||||
static char format[32];
|
||||
format[0] = '%';
|
||||
char *ptr = format+1;
|
||||
|
||||
while (ptr-format<sizeof(format) && !isalpha(*ptr++ = *def++))
|
||||
/*nothing*/;
|
||||
ZEROTERM(format);
|
||||
|
@ -634,6 +642,7 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
|
|||
}
|
||||
outptr += strlen(outptr);
|
||||
}
|
||||
}
|
||||
else if (*def == '^')
|
||||
{
|
||||
++def;
|
||||
|
|
Loading…
Reference in New Issue
Block a user