mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Lang strings can now contain ^n (newline), ^t (tabulator) and ^^ (^).
This commit is contained in:
parent
16c406fe1a
commit
b6d142f481
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user