const char *p;
int do_unquote = 0;
+ if (quoted_string == NULL)
+ return NULL;
+
/* Quickly try to determine if we need to unquote or not */
for (p = quoted_string; *p; p++){
if (*p == '\'' || *p == '"' || *p == '\\'){
g_set_error (error, 0, 0, "Open quote");
return NULL;
}
- int append = -1;
switch (*p){
case '$':
case '"':
return NULL;
}
} else if (*p == '\\'){
- p++;
- char c = *p;
+ char c = *(++p);
if (!(c == '$' || c == '"' || c == '\\' || c == '`' || c == 0))
g_string_append_c (result, '\\');
if (c == 0)