diff --git a/src/compile.cpp b/src/compile.cpp index 97e3767ec9..fbc9450165 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -4953,7 +4953,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip, case iinc: { uint16_t index = codeReadInt16(t, code, ip); - uint16_t count = codeReadInt16(t, code, ip); + int16_t count = codeReadInt16(t, code, ip); storeLocal (context, 1, diff --git a/test/Integers.java b/test/Integers.java index 80e1a0e3a5..c88803b518 100644 --- a/test/Integers.java +++ b/test/Integers.java @@ -21,6 +21,11 @@ public class Integers { } public static void main(String[] args) { + { int foo = 1028; + foo -= 1023; + expect(foo == 5); + } + expect(gcd(12, 4) == 4); { int a = 2;