Allow injecting .srm type GBA saves

Fixes #323
This commit is contained in:
d0k3 2018-03-09 00:05:31 +01:00
parent 3c7ad93d1c
commit db5208a7b8

View File

@ -174,7 +174,7 @@ u32 InjectGbaVcSavegameBuffered(const char* path, const char* path_vcsave, void*
// basic sanity checks for path_vcsave
FILINFO fno;
char* ext = strrchr(path_vcsave, '.');
if (!ext || (strncasecmp(++ext, "sav", 4) != 0)) return 1; // bad extension
if (!ext || ((strncasecmp(ext+1, "sav", 4) != 0) && (strncasecmp(ext+1, "srm", 4) != 0))) return 1; // bad extension
if ((fvx_stat(path_vcsave, &fno) != FR_OK) || !GBASAVE_VALID(fno.fsize))
return 1; // bad size