summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-02-16 17:14:56 -0500
committerJune McEnroe <june@causal.agency>2018-02-16 17:14:56 -0500
commit6623a97decd7c690271cb5370ae263a782f882cb (patch)
tree20ef4f503551af0c4de80ae049d2dd656a553b40
parentHandle more color types, depths, IDATs in pngo (diff)
downloadsrc-6623a97decd7c690271cb5370ae263a782f882cb.tar.gz
src-6623a97decd7c690271cb5370ae263a782f882cb.zip
Fix paethPredictor comparison
-rw-r--r--bin/pngo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/pngo.c b/bin/pngo.c
index 137580a0..a2575422 100644
--- a/bin/pngo.c
+++ b/bin/pngo.c
@@ -226,7 +226,7 @@ static uint8_t paethPredictor(uint8_t a, uint8_t b, uint8_t c) {
     int32_t pb = labs(p - (int32_t)b);
     int32_t pc = labs(p - (int32_t)c);
     if (pa <= pb && pa <= pc) return a;
-    if (pb < pc) return b;
+    if (pb <= pc) return b;
     return c;
 }