1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 07:30:21 +00:00

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

This reverts commit 761ab8cac6fd4e64f3ad6897c17e375acf5d75e5.
This commit is contained in:
Nick Briggs 2020-12-19 10:00:57 -08:00 committed by GitHub
parent 761ab8cac6
commit ade0e7d4a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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