summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index bca94a768..be6fc5100 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -219,6 +219,10 @@ void SExpressionParser::parseDebugLocation() {
while (debugLocEnd[0] && debugLocEnd[0] != '\n') {
debugLocEnd++;
}
+ if (debugLocEnd == debugLoc) {
+ loc = nullptr;
+ return;
+ }
char const* pos = debugLoc;
while (pos < debugLocEnd && pos[0] != ':') {
pos++;