summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 7a801920e..5dd363b9d 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -781,7 +781,7 @@ public:
}
if (curr->condition) recurse(curr->condition);
o << int8_t(curr->condition ? BinaryConsts::BrIf : BinaryConsts::Br)
- << int32_t(getBreakIndex(curr->name));
+ << LEB128(getBreakIndex(curr->name));
}
void visitSwitch(Switch *curr) {
if (debug) std::cerr << "zz node: Switch" << std::endl;
@@ -1599,7 +1599,7 @@ public:
void visitBreak(Break *curr, uint8_t code) {
if (debug) std::cerr << "zz node: Break" << std::endl;
- curr->name = getBreakName(getInt32());
+ curr->name = getBreakName(getLEB128());
if (code == BinaryConsts::BrIf) curr->condition = popExpression();
curr->value = popExpression();
}