summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOliver Horn <ohorn@users.noreply.github.com>2019-03-04 04:25:10 +0100
committerBen Smith <binjimin@gmail.com>2019-03-03 19:25:10 -0800
commitf320e3c34b4fbcf7d2ed30e8aa9ee01e383b67d6 (patch)
tree484b33e980b5f54ca3d0ee4fbf18fce4cf311c87 /src
parent3cdce2e009f371d532db748227fac615eb661e64 (diff)
downloadwabt-f320e3c34b4fbcf7d2ed30e8aa9ee01e383b67d6.tar.gz
wabt-f320e3c34b4fbcf7d2ed30e8aa9ee01e383b67d6.tar.bz2
wabt-f320e3c34b4fbcf7d2ed30e8aa9ee01e383b67d6.zip
wasm-objdump: fix f64 init expressions (#1029)
The `PrintInitExpr` function falsely treated f64 as a float instead of a double. The test case `global.txt` also contained the wrong output, namely `0x0p+0` instead of `0x1p+2` for `(f64.const 4)`.
Diffstat (limited to 'src')
-rw-r--r--src/binary-reader-objdump.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 03c4df8d..d4d058d3 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -1218,7 +1218,7 @@ void BinaryReaderObjdump::PrintInitExpr(const InitExpr& expr) {
break;
case InitExprType::F64: {
char buffer[WABT_MAX_DOUBLE_HEX];
- WriteFloatHex(buffer, sizeof(buffer), expr.value.f64);
+ WriteDoubleHex(buffer, sizeof(buffer), expr.value.f64);
PrintDetails(" - init f64=%s\n", buffer);
break;
}