|
@@ -92,11 +92,17 @@ int w_parse_select(char**p, select_t* sel)
|
|
|
sel->n++;
|
|
|
if (*(*p)=='[') {
|
|
|
(*p)++;
|
|
|
+ if (*(*p)=='\\') (*p)++;
|
|
|
if (*(*p)=='"') {
|
|
|
(*p)++;
|
|
|
name.s=(*p);
|
|
|
- while (*(*p)!='"') (*p)++;
|
|
|
+ while ((*(*p)!='\0') && (*(*p)!='"')) (*p)++;
|
|
|
+ if (*(*p)!='"') {
|
|
|
+ ERR("parse_select: end of string is missing\n");
|
|
|
+ goto error;
|
|
|
+ }
|
|
|
name.len=(*p)-name.s;
|
|
|
+ if (*((*p)-1)=='\\') name.len--;
|
|
|
(*p)++;
|
|
|
if (*(*p)!=']') {
|
|
|
ERR("parse_select: invalid string index, no closing ]\n");
|