From 05c11fefe0c633ab061b9f69180593ed9cf073a2 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 17 Jul 2012 02:17:42 +0200 Subject: [PATCH] topng: fix bug causing bogus double insertion of filter alg byte --- sys/src/cmd/jpg/writepng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/jpg/writepng.c b/sys/src/cmd/jpg/writepng.c index f36046e1b..da9d6d374 100644 --- a/sys/src/cmd/jpg/writepng.c +++ b/sys/src/cmd/jpg/writepng.c @@ -79,7 +79,7 @@ zread(void *va, void *buf, int n) pixwid = z->pixwid; b = buf; e = b+n; - while(b+pixwid <= e){ + while(b+pixwid < e){ /* one less for filter alg byte */ if(z->y >= z->dy) break; if(z->x == 0)