summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm-binary.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 571c878c4..d0bd0a818 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -39,7 +39,7 @@ struct LEB128 {
void write(std::vector<uint8_t>* out) {
uint32_t temp = value;
do {
- uint8_t byte = value & 127;
+ uint8_t byte = temp & 127;
temp >>= 7;
if (temp) {
byte = byte | 128;