From 8c19c7eefe4980cfba39e835fd6ab7bb95c3f9ad Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 18 Dec 2015 17:31:44 -0800 Subject: be more careful about parsing s-expression comments --- src/wasm-s-parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index deeaba155..6061dacc5 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -153,7 +153,7 @@ private: while (1) { while (isspace(input[0])) input++; if (input[0] == ';' && input[1] == ';') { - while (input[0] != '\n') input++; + while (input[0] && input[0] != '\n') input++; } else if (input[0] == '(' && input[1] == ';') { input = strstr(input, ";)") + 2; } else { -- cgit v1.2.3