diff options
-rw-r--r-- | src/wasm-s-parser.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index f9fa4e565..a49fa7bd5 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -160,13 +160,17 @@ private: Element* parseString() { if (input[0] == '$') input++; // names begin with $, but we don't need that internally + char *start = input; bool quoted = false; if (input[0] == '"') { quoted = true; + start++; + input = strchr(start, '"'); + assert(input); input++; + } else { + while (input[0] && !isspace(input[0]) && input[0] != ')') input++; } - char *start = input; - while (input[0] && !isspace(input[0]) && input[0] != ')') input++; char temp = input[0]; input[0] = 0; if (quoted) input[-1] = 0; |