summaryrefslogtreecommitdiff
path: root/src/wasm-parse-literal.c
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-03-19 22:26:12 -0700
committerBen Smith <binji@chromium.org>2016-03-19 23:26:06 -0700
commit0114d0b5dff98da0ad2551ea74c4cb5bceadc1cc (patch)
treee85112795c2bc979ba3ecb2e354a5aebb3024ef0 /src/wasm-parse-literal.c
parentd0ac26ab37db5ac6c11902b21b16ab33dafd5975 (diff)
downloadwabt-0114d0b5dff98da0ad2551ea74c4cb5bceadc1cc.tar.gz
wabt-0114d0b5dff98da0ad2551ea74c4cb5bceadc1cc.tar.bz2
wabt-0114d0b5dff98da0ad2551ea74c4cb5bceadc1cc.zip
rewrite hexfloat_test w/ gtest
Diffstat (limited to 'src/wasm-parse-literal.c')
-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;
}