diff options
-rwxr-xr-x | check.py | 2 | ||||
-rw-r--r-- | src/wasm-s-parser.h | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -84,7 +84,7 @@ if len(requested) == 0: # 'address' : filed issue, test looks invalid # 'exports', 'int_literals' : has a "return" https://github.com/WebAssembly/spec/issues/164 # 'switch': todo once stable - spec_tests = [os.path.join('spec', t + '.wast') for t in ['conversions', 'endianness', 'f32_cmp', 'f32', 'f64_cmp', 'f64', 'float_exprs', 'forward', 'func_ptrs', 'functions', 'has_feature', 'i32', 'i64', 'imports', 'int_exprs', 'left-to-right', 'memory_redundancy', 'memory_trap']] + spec_tests = [os.path.join('spec', t + '.wast') for t in ['conversions', 'endianness', 'f32_cmp', 'f32', 'f64_cmp', 'f64', 'float_exprs', 'forward', 'func_ptrs', 'functions', 'has_feature', 'i32', 'i64', 'imports', 'int_exprs', 'left-to-right', 'memory_redundancy', 'memory_trap', 'names']] else: spec_tests = requested[:] 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 { |