Skip to content

Commit 909c543

Browse files
committed
bugfix in a test
1 parent 5309041 commit 909c543

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test-programs/nontrivial/bitwise.wend

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ main() {
1717
result = -2147483648;
1818
}
1919
if (a<0) {
20-
a = a + 2147483648;
20+
a = (a + 1073741824) + 1073741824; // +2147483648 does not fit into signed 32 bits, split into two halves
2121
}
2222
if (b<0) {
23-
b = b + 2147483648;
23+
b = (b + 1073741824) + 1073741824;
2424
}
2525
pow = 1;
2626
while a>0 || b>0 {

0 commit comments

Comments
 (0)