diff --git a/src/filesystem.cpp b/src/filesystem.cpp index b72800d..0b34b2f 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -706,6 +706,8 @@ static int SDL_RWopsClose(SDL_RWops *ops) int result = PHYSFS_close(f); + f = 0; + return (result != 0) ? 0 : -1; }