From eefc5dd5fda4e78432955f500b98192a376c5207 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 5 Aug 2016 01:16:53 +0200 Subject: Fix bug in libclut_apply__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libclut.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libclut.h b/src/libclut.h index 9e8c6f2..0b5f081 100644 --- a/src/libclut.h +++ b/src/libclut.h @@ -859,7 +859,7 @@ static inline int libclut_0__(double x) { return libclut_eq__(x, 0); } #define libclut_apply__(clut, max, type, filter, fmax, ftype, channel) \ do \ { \ - size_t i__, rn__ = (clut)->channel##_size - 1, fn__ = (filter)->channel##_size - 1; \ + size_t i__, rn__ = (clut)->channel##_size, fn__ = (filter)->channel##_size - 1; \ double x__, rm__ = (double)(max), m__ = (double)(max) / (double)(fmax); \ for (i__ = 0; i__ < rn__; i__++) \ { \ -- cgit v1.2.3-70-g09d2