summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/mathop.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-05-28 02:18:52 +0000
committerKarl Berry <karl@freefriends.org>2011-05-28 02:18:52 +0000
commitc59fe5fe4739f0c61560f05d4e42b4e552219b27 (patch)
tree8cf79e85e394b3177a28d374415840a4e0a025ad /Build/source/utils/asymptote/mathop.h
parent771db15706dbf3f4af8b630dcb15646a3e5fda00 (diff)
asy 2.10
git-svn-id: svn://tug.org/texlive/trunk@22633 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/mathop.h')
-rw-r--r--Build/source/utils/asymptote/mathop.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Build/source/utils/asymptote/mathop.h b/Build/source/utils/asymptote/mathop.h
index 97772d8e799..572a9f7ee1b 100644
--- a/Build/source/utils/asymptote/mathop.h
+++ b/Build/source/utils/asymptote/mathop.h
@@ -143,7 +143,8 @@ struct times<Int> {
Int operator() (Int x, Int y, size_t i=0) {
if(y == 0) return 0;
if(y < 0) {y=-y; x=-x;}
- if(x > Int_MAX/y || x < Int_MIN/y)
+ if((y > int_MAX || x > int_MAX/(int) y || x < int_MIN/(int) y) &&
+ (x > Int_MAX/y || x < Int_MIN/y))
integeroverflow(i);
return x*y;
}