diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-07 12:21:27 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-07 12:21:27 +0100 |
| commit | 3c268263e45f4bb2af39cd07c1c6545092fc9f69 (patch) | |
| tree | f9b57d5f90b924a7af07dd74b61b3efc19ae76fc | |
| parent | 5d633bf6e21af1a6c093433547da65e1d810aa14 (diff) | |
br_if.c: Consider both MSB and LSB for i64
Otherwise, values such as 0x100000000 (i.e., the 32th-bit is set) would
not cause a branch because only the lower 32 bits would be tested.
| -rw-r--r-- | src/op/br_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op/br_if.c b/src/op/br_if.c index 661c959..5b6b5a2 100644 --- a/src/op/br_if.c +++ b/src/op/br_if.c @@ -26,7 +26,7 @@ static int condition(struct nw_interp *const i) return b->condition.i32; case NW_TYPE_I64: - return b->condition.i64.low; + return b->condition.i64.low || b->condition.i64.hi; case NW_TYPE_F32: return b->condition.f32; |
