From 0b493366437a50dd588d5c75ec9d4e1c965d37fc Mon Sep 17 00:00:00 2001 From: Christian Kroll Date: Tue, 1 Nov 2011 14:56:24 +0000 Subject: [PATCH] saved 12 bytes (yes, I really needed them) --- games/snake/snake_game.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/games/snake/snake_game.c b/games/snake/snake_game.c index 0cd2866..053b0d1 100644 --- a/games/snake/snake_game.c +++ b/games/snake/snake_game.c @@ -269,12 +269,12 @@ static void snake_autoRoute(snake_protagonist_t *pprotSnake, } } - for (uint8_t i = 4; i--;) + for (uint8_t i = 0; i < 4; ++i) { pixel pxTest = snake_applyDirection(pxHead, pprotSnake->dir); if (get_pixel(pxTest)) { - for (uint8_t j = pApples->nAppleCount; j--;) + for (uint8_t j = 0; j < pApples->nAppleCount; ++j) { if ((pxTest.x == pApples->aApples[j].x) && (pxTest.y == pApples->aApples[j].y))