From 1a28bcb8109648fa02f52e8aa6b3c57fb81358a5 Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 10 Jan 2005 00:29:51 +0000 Subject: [PATCH] * fixed bound error in filter_contrast git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@441 92316355-f0b4-4df1-b90c-862c8a59935f --- src/filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filters.c b/src/filters.c index b884d7d..9d40913 100644 --- a/src/filters.c +++ b/src/filters.c @@ -383,7 +383,7 @@ struct image *filter_contrast(struct image *img) if(min == max) histo[min] = 127; else - for(i = min; i < max; i++) + for(i = min; i < max + 1; i++) histo[i] = (i - min) * 255 / (max - min); for(y = 0; y < img->height; y++)