summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index 3200e77a7..7b682a264 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -1858,7 +1858,7 @@ void BinaryInstWriter::emitCatch(Try* curr, Index i) {
parent.writeExtraDebugLocation(curr, func, i);
}
o << int8_t(BinaryConsts::Catch)
- << U32LEB(parent.getEventIndex(curr->catchEvents[i]));
+ << U32LEB(parent.getTagIndex(curr->catchTags[i]));
}
void BinaryInstWriter::emitCatchAll(Try* curr) {
@@ -1879,7 +1879,7 @@ void BinaryInstWriter::emitDelegate(Try* curr) {
}
void BinaryInstWriter::visitThrow(Throw* curr) {
- o << int8_t(BinaryConsts::Throw) << U32LEB(parent.getEventIndex(curr->event));
+ o << int8_t(BinaryConsts::Throw) << U32LEB(parent.getTagIndex(curr->tag));
}
void BinaryInstWriter::visitRethrow(Rethrow* curr) {