From f75517f7f8df5b95bfa1806f8fc36d4d43c2bd3f Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 19 Jan 2014 00:50:27 -0800 Subject: [PATCH] Fixing add 32 w/ saturate. --- src/alloy/backend/ivm/ivm_intcode.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloy/backend/ivm/ivm_intcode.cc b/src/alloy/backend/ivm/ivm_intcode.cc index 200b297b6..77dd2c472 100644 --- a/src/alloy/backend/ivm/ivm_intcode.cc +++ b/src/alloy/backend/ivm/ivm_intcode.cc @@ -2350,7 +2350,7 @@ uint32_t Translate_VECTOR_ADD_I32(IntCodeState& ics, const IntCode* i) { if (v > 0x7FFFFFFF) { dest.i4[n] = 0x7FFFFFFF; ics.did_saturate = 1; - } else if (v < 0x80000000ull) { + } else if (v < -0x80000000ll) { dest.i4[n] = 0x80000000; ics.did_saturate = 1; } else {