From 4382c2f0888975f1c50a9fd3380e6d543e3f8664 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Thu, 15 Jan 2015 15:36:40 +0200 Subject: [PATCH] Added missing -1 to PIXEL_MAX macro --- src/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global.h b/src/global.h index 773d2560..f50cb1da 100644 --- a/src/global.h +++ b/src/global.h @@ -44,7 +44,7 @@ #define BIT_DEPTH 8 #define PIXEL_MIN 0 -#define PIXEL_MAX (1 << BIT_DEPTH) +#define PIXEL_MAX ((1 << BIT_DEPTH) - 1) #if BIT_DEPTH == 8 typedef uint8_t pixel;