summaryrefslogtreecommitdiff
path: root/x11/xearth/patches
diff options
context:
space:
mode:
authoratatat <atatat>2001-07-10 14:32:32 +0000
committeratatat <atatat>2001-07-10 14:32:32 +0000
commitf6732c818bf6a05e45ddb087511ba3ef2867fbc8 (patch)
tree6fb08e9757677489974397e92282ac1e4ed6bc43 /x11/xearth/patches
parentf465eb6767c77760d4b549c9d35d4b2b6d6726af (diff)
downloadpkgsrc-f6732c818bf6a05e45ddb087511ba3ef2867fbc8.tar.gz
Eliminate the hideous blue-on-black problem with zoom factors set too
high. The problem is with casting doubles to ints, which is nasty and overflows easily.
Diffstat (limited to 'x11/xearth/patches')
-rw-r--r--x11/xearth/patches/patch-aa24
1 files changed, 24 insertions, 0 deletions
diff --git a/x11/xearth/patches/patch-aa b/x11/xearth/patches/patch-aa
new file mode 100644
index 00000000000..5871cdc2be9
--- /dev/null
+++ b/x11/xearth/patches/patch-aa
@@ -0,0 +1,24 @@
+--- scan.c.orig Sun Nov 7 01:51:55 1999
++++ scan.c Tue Jul 10 09:31:14 2001
+@@ -626,6 +626,10 @@
+ right = XPROJECT(M_PI);
+ top = YPROJECT(BigNumber);
+ bottom = YPROJECT(-BigNumber);
++ if (top >= INT_MAX) top = INT_MAX - 1;
++ if (top <= INT_MIN) top = INT_MIN + 1;
++ if (bottom >= INT_MAX) bottom = INT_MAX - 1;
++ if (bottom <= INT_MIN) bottom = INT_MIN + 1;
+
+ scan(right, top, left, top);
+ scan(left, top, left, bottom);
+@@ -995,6 +999,10 @@
+ right = XPROJECT(M_PI);
+ top = YPROJECT(BigNumber);
+ bottom = YPROJECT(-BigNumber);
++ if (top >= INT_MAX) top = INT_MAX - 1;
++ if (top <= INT_MIN) top = INT_MIN + 1;
++ if (bottom >= INT_MAX) bottom = INT_MAX - 1;
++ if (bottom <= INT_MIN) bottom = INT_MIN + 1;
+
+ scan(right, top, left, top);
+ scan(left, top, left, bottom);