about summary refs log tree commit diff
path: root/converter/ppm/picttoppm.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-01-02 16:57:24 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-01-02 16:57:24 +0000
commit069b9804a6c5035ce90cd7480b4a701698c173dd (patch)
treebd069268c80011fc854ecc865c3b89eb564caa12 /converter/ppm/picttoppm.c
parente625edd598d9809a2dfc7fe990fcad90ad73e2f4 (diff)
downloadnetpbm-mirror-069b9804a6c5035ce90cd7480b4a701698c173dd.tar.gz
netpbm-mirror-069b9804a6c5035ce90cd7480b4a701698c173dd.tar.xz
netpbm-mirror-069b9804a6c5035ce90cd7480b4a701698c173dd.zip
fix bug from a few minutes ago
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@810 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm/picttoppm.c')
-rw-r--r--converter/ppm/picttoppm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/converter/ppm/picttoppm.c b/converter/ppm/picttoppm.c
index 04d8cc5f..a367ead5 100644
--- a/converter/ppm/picttoppm.c
+++ b/converter/ppm/picttoppm.c
@@ -784,10 +784,10 @@ read_rect(struct Rect * const r) {
     r->bottom = read_word();
     r->right  = read_word();
 
-    if (r->top < r->bottom || r->right < r->left)
+    if (r->top > r->bottom || r->right < r->left)
         dumpRect("Invalid rectangle", *r);
 
-    if (r->top < r->bottom)
+    if (r->top > r->bottom)
         pm_error("Invalid PICT: a rectangle has a top below its bottom");
     if (r->right < r->left)
         pm_error("Invalid PICT: a rectangle has a right edge "