diff options
author | Ben Smith <binji@chromium.org> | 2016-03-19 22:26:12 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-03-19 23:26:06 -0700 |
commit | 0114d0b5dff98da0ad2551ea74c4cb5bceadc1cc (patch) | |
tree | e85112795c2bc979ba3ecb2e354a5aebb3024ef0 /src/wasm-parse-literal.c | |
parent | d0ac26ab37db5ac6c11902b21b16ab33dafd5975 (diff) | |
download | wabt-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.c | 3 |
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; } |