diff options
-rw-r--r-- | src/wasm-interpreter.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 2458b60e1..3f69d36e5 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -774,7 +774,9 @@ private: std::cout << "entering " << function->name << '\n'; #endif - Literal ret = ExpressionRunner(*this, scope).visit(function->body).value; + Flow flow = ExpressionRunner(*this, scope).visit(function->body); + assert(!flow.breaking()); // cannot still be breaking, it means we missed our stop + Literal ret = flow.value; if (function->result == none) ret = Literal(); assert(function->result == ret.type); callDepth--; |