Lang strings can now contain ^n (newline), ^t (tabulator) and ^^ (^).

This commit is contained in:
Pavol Marko 2004-08-19 19:34:49 +00:00
parent 16c406fe1a
commit b6d142f481

View File

@ -695,7 +695,29 @@ char * CLangMngr::FormatAmxString(AMX *amx, cell *params, int parm, int &len)
} }
outptr += strlen(outptr); outptr += strlen(outptr);
} }
*outptr++ = *def++; else if (*def == '^')
{
++def;
switch (*def)
{
case 'n':
*outptr++ = '\n';
break;
case 't':
*outptr++ = '\t';
break;
case '^':
*outptr++ = '^';
break;
default:
*outptr++ = '^';
*outptr++ = *def;
break;
}
++def;
}
else
*outptr++ = *def++;
} }
} }
else else