summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index ce7d0df3c..b32917432 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -1579,8 +1579,9 @@ void FunctionValidator::validateMemBytes(uint8_t bytes,
"expected i64 operation to touch 1, 2, 4, or 8 bytes");
break;
case Type::f32:
- shouldBeEqual(
- bytes, uint8_t(4), curr, "expected f32 operation to touch 4 bytes");
+ shouldBeTrue(bytes == 2 || bytes == 4,
+ curr,
+ "expected f32 operation to touch 2 or 4 bytes");
break;
case Type::f64:
shouldBeEqual(