parent
70d5830f00
commit
1b18c2baa3
11
src/game.cc
11
src/game.cc
|
@ -1364,15 +1364,14 @@ static int gameDbInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SFALL: custom patch file name.
|
// SFALL: custom patch file name.
|
||||||
char* patch_filename = nullptr;
|
char* path_file_name_template = nullptr;
|
||||||
if (configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_PATCH_FILE, &patch_filename)) {
|
configGetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_PATCH_FILE, &path_file_name_template);
|
||||||
if (patch_filename == nullptr || *patch_file_name == '\0') {
|
if (path_file_name_template == nullptr || *path_file_name_template == '\0') {
|
||||||
patch_filename = "patch%03d.dat";
|
path_file_name_template = "patch%03d.dat";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (patch_index = 0; patch_index < 1000; patch_index++) {
|
for (patch_index = 0; patch_index < 1000; patch_index++) {
|
||||||
snprintf(filename, sizeof(filename), patch_filename, patch_index);
|
snprintf(filename, sizeof(filename), path_file_name_template, patch_index);
|
||||||
|
|
||||||
if (compat_access(filename, 0) == 0) {
|
if (compat_access(filename, 0) == 0) {
|
||||||
dbOpen(filename, 0, nullptr, 1);
|
dbOpen(filename, 0, nullptr, 1);
|
||||||
|
|
Loading…
Reference in New Issue