summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm-parse-literal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm-parse-literal.c b/src/wasm-parse-literal.c
index 183306bc..d9b8d478 100644
--- a/src/wasm-parse-literal.c
+++ b/src/wasm-parse-literal.c
@@ -796,7 +796,8 @@ void wasm_write_double_hex(char* out, size_t size, uint64_t bits) {
} else {
*p++ = '+';
}
- if (exp >= 100) *p++ = '1';
+ if (exp >= 1000) *p++ = '1';
+ if (exp >= 100) *p++ = '0' + (exp / 100) % 10;
if (exp >= 10) *p++ = '0' + (exp / 10) % 10;
*p++ = '0' + exp % 10;
}