Added special cases for %% and % at end of phrase for formatting of phrases defined in language definition files.

This commit is contained in:
Pavol Marko 2004-10-29 13:11:12 +00:00
parent 8761791473
commit cc4bbadfa2

View File

@ -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;