From 7607bc41427e4cf075c64e6f416974884714f071 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 29 Aug 2011 10:58:17 +0200 Subject: [PATCH] Fix write past end of array. Found by cppcheck. --- code/shop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/shop.cpp b/code/shop.cpp index 9e4f5aa..808844e 100644 --- a/code/shop.cpp +++ b/code/shop.cpp @@ -459,7 +459,7 @@ void initShop() shopItems[i + 8].y = 200; } - for (int i = 0 ; i < 8 ; i++) + for (int i = 0 ; i < 7 ; i++) { shopItems[i + 10].x = 350 + (i * 50); shopItems[i + 10].y = 260;