summaryrefslogtreecommitdiff
path: root/inc/ex.h
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-22 20:48:31 -0400
committerbd <bdunahu@operationnull.com>2025-04-22 20:48:31 -0400
commit1bbc5b157e16dae032b5e44a7dcf009766eb9ca5 (patch)
tree02a1439bf92c58656fe99973a3391ffc38635330 /inc/ex.h
parent3d0133c2f793e82d7519d8e2c5023114cd0f0eab (diff)
Fix bug where checking for multiplication overflow resulted in FPE
Diffstat (limited to 'inc/ex.h')
-rw-r--r--inc/ex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/ex.h b/inc/ex.h
index f7428da..c356543 100644
--- a/inc/ex.h
+++ b/inc/ex.h
@@ -41,7 +41,7 @@
((b < 0) && (a < 0) && (a < MAX_INT / b)))
#define MULTIPLICATION_UF_GUARD(a, b) \
- (b != 0) && \
+ (b != 0) && (b != -1) && \
(((b > 0) && (a < 0) && (a < (-(MAX_INT)-1) / b)) || \
((b < 0) && (a > 0) && (a > (-(MAX_INT)-1) / b)))