Forgot to escape backslashes.

This commit is contained in:
Michael Jumper
2010-09-06 18:54:14 -07:00
parent a308648ef7
commit ffa1c171fa

View File

@@ -19,10 +19,8 @@ char* guac_escape_string(const char* str) {
switch (str[i]) { switch (str[i]) {
case ';': case ';':
length += 2;
break;
case ',': case ',':
case '\\':
length += 2; length += 2;
break; break;
@@ -49,6 +47,11 @@ char* guac_escape_string(const char* str) {
*(current++) = 'c'; *(current++) = 'c';
break; break;
case '\\':
*(current++) = '\\';
*(current++) = '\\';
break;
default: default:
*(current++) = str[i]; *(current++) = str[i];
} }