summaryrefslogtreecommitdiff
path: root/print/xpdf/patches
diff options
context:
space:
mode:
authorsimonb <simonb>2002-03-23 14:08:12 +0000
committersimonb <simonb>2002-03-23 14:08:12 +0000
commitc0e89318bfb8498b6f7cc646c571918cae2f286a (patch)
tree61be8b821d9492e424fbf70d5868c74ec845d2cc /print/xpdf/patches
parent2d6c63f253f92a86a87369e67f8fad95348cc3a8 (diff)
downloadpkgsrc-c0e89318bfb8498b6f7cc646c571918cae2f286a.tar.gz
Work around divide-by-zero core dumps on alpha.
Problem report and patch sent to the xpdf author.
Diffstat (limited to 'print/xpdf/patches')
-rw-r--r--print/xpdf/patches/patch-ab19
1 files changed, 19 insertions, 0 deletions
diff --git a/print/xpdf/patches/patch-ab b/print/xpdf/patches/patch-ab
new file mode 100644
index 00000000000..52f448a26d5
--- /dev/null
+++ b/print/xpdf/patches/patch-ab
@@ -0,0 +1,19 @@
+$NetBSD: patch-ab,v 1.1 2002/03/23 14:08:12 simonb Exp $
+
+--- xpdf/TextOutputDev.cc.orig Sat Feb 2 10:15:45 2002
++++ xpdf/TextOutputDev.cc
+@@ -154,8 +154,12 @@
+ dx -= dx2;
+ dy -= dy2;
+ state->transformDelta(dx, dy, &w1, &h1);
+- w1 /= uLen;
+- h1 /= uLen;
++ if (uLen == 0) {
++ w1 = h1 = 0.;
++ } else {
++ w1 /= uLen;
++ h1 /= uLen;
++ }
+ for (i = 0; i < uLen; ++i) {
+ curStr->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, u[i]);
+ }