mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
CConfig: Use str_escape in EscapeParam()
This commit is contained in:
parent
88fb027cb2
commit
59deb42252
|
@ -7,15 +7,9 @@
|
|||
|
||||
CConfig g_Config;
|
||||
|
||||
void EscapeParam(char *pDst, const char *pSrc, int size)
|
||||
void EscapeParam(char *pDst, const char *pSrc, int Size)
|
||||
{
|
||||
for(int i = 0; *pSrc && i < size - 1; ++i)
|
||||
{
|
||||
if(*pSrc == '"' || *pSrc == '\\') // escape \ and "
|
||||
*pDst++ = '\\';
|
||||
*pDst++ = *pSrc++;
|
||||
}
|
||||
*pDst = 0;
|
||||
str_escape(&pDst, pSrc, pDst + Size);
|
||||
}
|
||||
|
||||
CConfigManager::CConfigManager()
|
||||
|
|
Loading…
Reference in a new issue