fix an oopsie

This commit is contained in:
veclav talica 2024-10-08 10:13:07 +03:00
parent 0ede612bec
commit 68df2eecfc

View File

@ -736,10 +736,11 @@ int enter_loop(int argc, char **argv) {
if (!PHYSFS_mount(full_path, NULL, true)) {
SDL_free(full_path);
SDL_asprintf(&full_path, "%sdata.btw", ctx.base_dir);
if (!PHYSFS_mount(full_path, NULL, true))
if (!PHYSFS_mount(full_path, NULL, true)) {
SDL_free(full_path);
CRY_PHYSFS("Cannot find data.btw or data directory in root. Please create them or specify with --data-dir parameter.");
return EXIT_FAILURE;
}
}
SDL_free(full_path);
}