From 9a570a67ca07aca39037024d37db1ad33712dbf1 Mon Sep 17 00:00:00 2001 From: iLag Date: Sat, 25 Mar 2017 19:35:36 -0700 Subject: [PATCH] Restore support for short GG cheats. --- pico/patch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pico/patch.c b/pico/patch.c index 09626160..7f5d594b 100644 --- a/pico/patch.c +++ b/pico/patch.c @@ -174,7 +174,7 @@ void genie_decode_ms(const char *code, struct patch *result) /* Correct the address */ result->addr = ((result->addr >> 4) | (result->addr << 12 & 0xF000)) ^ 0xF000; /* Optional: 3 digits for comp */ - if (code[8]){ + if (code[8]=='-'){ for(i=8;i<11;++i) { if (i==9) continue; /* 2nd character is ignored */ @@ -314,7 +314,7 @@ void decode(const char* code, struct patch* result) //If Master System //Genie - if(len == 11 && code[3] == '-' && code[7] == '-') + if(len >= 7 && code[3] == '-') { genie_decode_ms(code, result); } -- 2.39.5