diff --git a/src/filesystem.cpp b/src/filesystem.cpp index f448ac5..70d5065 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -325,13 +325,18 @@ FileSystem::FileSystem(const char *argv0, if (PHYSFS_init(argv0) == 0) throwPhysfsError("Error initializing PhysFS"); + /* One error (=return 0) turns the whole product to 0 */ + int er = 1; + er *= PHYSFS_registerArchiver(&RGSS1_Archiver); + er *= PHYSFS_registerArchiver(&RGSS2_Archiver); + er *= PHYSFS_registerArchiver(&RGSS3_Archiver); + + if (er == 0) + throwPhysfsError("Error registering PhysFS RGSS archiver"); + p = new FileSystemPrivate; p->havePathCache = false; - PHYSFS_registerArchiver(&RGSS1_Archiver); - PHYSFS_registerArchiver(&RGSS2_Archiver); - PHYSFS_registerArchiver(&RGSS3_Archiver); - if (allowSymlinks) PHYSFS_permitSymbolicLinks(1); }