mirror of https://github.com/snes9xgit/snes9x.git
Fix ips sequences in patch dir
This commit is contained in:
parent
d502fe0738
commit
1c16c0cb63
12
memmap.cpp
12
memmap.cpp
|
@ -3908,9 +3908,9 @@ void CMemory::CheckForAnyPatch(const char *rom_filename, bool8 header, int32 &ro
|
||||||
auto try_ips_sequence = [&](const char *pattern) -> bool {
|
auto try_ips_sequence = [&](const char *pattern) -> bool {
|
||||||
for (int i = 0; i < 1000; i++)
|
for (int i = 0; i < 1000; i++)
|
||||||
{
|
{
|
||||||
char ips[8];
|
char ips[9];
|
||||||
snprintf(ips, 8, pattern, i);
|
snprintf(ips, 9, pattern, i);
|
||||||
if (!try_patch("IPS", ips, ReadIPSPatch))
|
if (!try_patch("IPS", S9xGetFilename(ips, PATCH_DIR), ReadIPSPatch))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
|
@ -3922,10 +3922,10 @@ void CMemory::CheckForAnyPatch(const char *rom_filename, bool8 header, int32 &ro
|
||||||
return;
|
return;
|
||||||
if (try_patch("IPS", S9xGetFilename(".ips", PATCH_DIR), ReadIPSPatch))
|
if (try_patch("IPS", S9xGetFilename(".ips", PATCH_DIR), ReadIPSPatch))
|
||||||
return;
|
return;
|
||||||
if (try_ips_sequence("%03d.ips"))
|
if (try_ips_sequence(".%03d.ips"))
|
||||||
return;
|
return;
|
||||||
if (try_ips_sequence("ips%d"))
|
if (try_ips_sequence(".ips%d"))
|
||||||
return;
|
return;
|
||||||
if (try_ips_sequence("ip%d"))
|
if (try_ips_sequence(".ip%d"))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
Loading…
Reference in New Issue