diff options
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 4 |
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++; |