From 9a565d05ebafca5dd24ba4316af7efdfa0175a38 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 6 Nov 2015 10:29:47 -0800 Subject: parse escaped double-quotes --- src/wasm-s-parser.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 58f316075..969175f8a 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -183,8 +183,12 @@ private: bool quoted = false; if (input[0] == '"') { quoted = true; - start++; - input = strchr(start, '"'); + while (1) { + start++; + input = strchr(start, '"'); + assert(input); + if (input[-1] != '\\') break; + } assert(input); input++; } else { -- cgit v1.2.3