From bdcc9c30e68e63ac2b17a415d9aceff3e62bbd07 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 2 Feb 2016 19:11:52 -0800 Subject: fix nan comparisons --- src/wasm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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(); } } -- cgit v1.2.3