Skip to content

Commit

Permalink
Prevent overflow causing negative numbers to be positive
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Oct 10, 2020
1 parent bf3344c commit 4429632
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/goalc/test_arithmetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ std::vector<IntegerParam> genIntegerTests(int numTests,
tests.push_back(IntegerParam(dist6(rng), false, i));
break;
case 1:
tests.push_back(IntegerParam(dist6(rng) * -1, false, i));
tests.push_back(IntegerParam((s64)dist6(rng) * -1, false, i));
break;
case 2:
tests.push_back(IntegerParam(dist6(rng), true, i));
Expand Down

0 comments on commit 4429632

Please sign in to comment.