CConfig: Use str_escape in EscapeParam()

This commit is contained in:
Alexander Akulich 2021-01-10 18:01:15 +03:00
parent 88fb027cb2
commit 59deb42252

View file

@ -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()