about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2008-09-27 01:37:09 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2008-09-27 01:37:09 +0000
commit5d64f5134f6677a5f6766cd4a6245f0a9056e152 (patch)
treea63a6e23e55b3bcb090076aabffa41299f53478d /lib
parenta23f38fc2e675b089ca23baf71d3e4c3ab23543e (diff)
downloadnetpbm-mirror-5d64f5134f6677a5f6766cd4a6245f0a9056e152.tar.gz
netpbm-mirror-5d64f5134f6677a5f6766cd4a6245f0a9056e152.tar.xz
netpbm-mirror-5d64f5134f6677a5f6766cd4a6245f0a9056e152.zip
Release 10.35.52
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@735 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r--lib/libppmd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libppmd.c b/lib/libppmd.c
index f2852338..6970b9f7 100644
--- a/lib/libppmd.c
+++ b/lib/libppmd.c
@@ -220,6 +220,14 @@ clipEnd0(int    const x0,
         }
     }
 
+    /* Clipping vertically may have moved the endpoint out of frame
+       horizontally.  If so, we know the other endpoint is also out of
+       frame horizontally and the line misses the frame entirely.
+    */
+    if (cx0 < 0 || cx0 >= cols) {
+        assert(x1 < 0 || x1 >= cols);
+        noLine = TRUE;
+    }
     *cx0P = cx0;
     *cy0P = cy0;
     *noLineP = noLine;