about summary refs log tree commit diff
path: root/converter/ppm/picttoppm.c
diff options
context:
space:
mode:
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 "