From 92d918bbe6f0d2d578c675a10bf581100ba79d83 Mon Sep 17 00:00:00 2001 From: Con Huevos Guey Date: Thu, 31 Dec 2015 14:10:19 -0600 Subject: [PATCH] Fixed bug in LCD display Fixed a bug in the where pressing 'UP' first caused garbage to be display on the LCD display. This was caused by 'c' being set to -2 making Gamelist[c] display garbage. --- ArcadeHacker_CPS1.ino | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ArcadeHacker_CPS1.ino b/ArcadeHacker_CPS1.ino index 4b8dec9..111a777 100644 --- a/ArcadeHacker_CPS1.ino +++ b/ArcadeHacker_CPS1.ino @@ -222,9 +222,13 @@ void loop() /*----( LOOP: RUNS CONSTANTLY )----*/ } case btnUP: { - if (c != 0) {c--;} - lcd.print(GameList[c]); - break; + if (c !=0) + { + if (c > 0) {c--;} else {c++;} + } + + lcd.print(GameList[c]); + break; } case btnDOWN: {