regular meeting with Mr. Off-By-One-Error

This commit is contained in:
Christian Kroll 2012-11-17 17:22:34 +00:00
parent 3c1fc902f4
commit 29c532b8b2
1 changed files with 1 additions and 1 deletions

View File

@ -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);