From 29c532b8b2903686baa5b1c17d46aa6eb039458c Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Sat, 17 Nov 2012 17:22:34 +0000 Subject: [PATCH] regular meeting with Mr. Off-By-One-Error --- animations/fpmath_patterns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/animations/fpmath_patterns.c b/animations/fpmath_patterns.c index 7305392..0de4142 100644 --- a/animations/fpmath_patterns.c +++ b/animations/fpmath_patterns.c @@ -384,7 +384,7 @@ static void fixDrawPattern(fixp_t const t_start, // the end of both buffers and move backwards through their space. // The pre-decrement operator is used so that GCC utilizes the AVR's // built-in pre-decrement variants of the "ld" and "st" instructions. - while (pPixmap >= (unsigned char *)pixmap) // stop at the beginning + while (pPixmap != &pixmap[0][0][0]) // stop at the beginning { // actually draw off-screen contents *(--pPixmap) = *(--pOffscreenDistHigh);