From 55eace739178394dadbd0c08dffc84606c986fa2 Mon Sep 17 00:00:00 2001 From: Cry0 Date: Wed, 21 Dec 2016 15:08:41 -0600 Subject: [PATCH] Correctly handle byte skipping --- gbz80aid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gbz80aid.c b/gbz80aid.c index d449d36..667a776 100644 --- a/gbz80aid.c +++ b/gbz80aid.c @@ -765,7 +765,8 @@ void hex_to_joy(char* str) } // Keep track of the last button for correction - last = buttons[index - 1]; + if (index) + last = buttons[index - 1]; // Print out the button combination for this byte for (int x = 0; x < index; x++)