summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-02-02 19:11:52 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-02-02 19:20:44 -0800
commitbdcc9c30e68e63ac2b17a415d9aceff3e62bbd07 (patch)
tree84c65acfd776f8869a074f9c391ecc1e1e329987
parentd467c8f522d7ed8e495b548a753b5f599f7778fa (diff)
downloadbinaryen-bdcc9c30e68e63ac2b17a415d9aceff3e62bbd07.tar.gz
binaryen-bdcc9c30e68e63ac2b17a415d9aceff3e62bbd07.tar.bz2
binaryen-bdcc9c30e68e63ac2b17a415d9aceff3e62bbd07.zip
fix nan comparisons
-rw-r--r--src/wasm.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 51b54846a..7a792fda4 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -207,10 +207,10 @@ public:
if (type != other.type) return false;
switch (type) {
case WasmType::none: return true;
- case WasmType::i32:
- case WasmType::f32: return i32 == other.i32;
- case WasmType::i64:
- case WasmType::f64: return i64 == other.i64;
+ case WasmType::i32: return i32 == other.i32;
+ case WasmType::f32: return getf32() == other.getf32();
+ case WasmType::i64: return i64 == other.i64;
+ case WasmType::f64: return getf64() == other.getf64();
default: abort();
}
}