Merge pull request #51 from ilag11111/cheatSupport
[picodrive.git] / platform / libretro / libretro.c
index 8e1bed3..f11b5da 100644 (file)
@@ -725,7 +725,7 @@ void retro_cheat_reset(void)
 void retro_cheat_set(unsigned index, bool enabled, const char *code)
 {
        patch pt;
-       int array_len = 0;
+       int array_len = PicoPatchCount;
        char codeCopy[256];
        char *buff;
        bool multiline=0;
@@ -774,6 +774,7 @@ void retro_cheat_set(unsigned index, bool enabled, const char *code)
 
                if (!multiline)
                        break;
+               buff = strtok(NULL,"+");
        }
 }