Use correct sqlite escapes of strings.

This commit is contained in:
Jan Vidar Krey 2010-07-29 11:29:40 +02:00
parent 4bf882d385
commit e03b4ff0c1
1 changed files with 2 additions and 2 deletions

View File

@ -82,8 +82,8 @@ static const char* sql_escape_string(const char* str)
size_t n = 0;
for (; n < strlen(str); n++)
{
if (str[n] == '\'' || str[n] == '\\')
out[i++] = '\\';
if (str[n] == '\'')
out[i++] = '\'';
out[i++] = str[n];
}
return out;