1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-04 07:33:07 +00:00

Revert "integer multiply overflow wasn't catching all cases (#100)" (#101)

This reverts commit 761ab8cac6.
This commit is contained in:
Nick Briggs
2020-12-19 10:00:57 -08:00
committed by GitHub
parent 761ab8cac6
commit ade0e7d4a6

View File

@@ -61,7 +61,7 @@ dummy:
#else
result = arg1 * arg2;
if ((arg2 != 0) && (((result % arg2) != 0) || ((result / arg2) != arg1))) goto doufn2;
if ((arg2 != 0) && ((result / arg2) != arg1)) goto doufn2;
N_ARITH_SWITCH(result);
#endif
@@ -91,7 +91,7 @@ dummy:
/* UB: signed integer overflow: 1073741824 * 32768 cannot be represented in type 'int' */
result = arg1 * arg2;
if ((arg2 != 0) && (((result % arg2) != 0) || ((result / arg2) != arg1))) { goto doufn; }
if ((arg2 != 0) && ((result / arg2) != arg1)) { goto doufn; }
N_ARITH_SWITCH(result);
#endif