summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h2
1 files changed, 1 insertions, 1 deletions
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 {