don't free the rwop twice

This commit is contained in:
Nathan McRae 2025-01-14 20:42:50 -08:00
parent d985eed563
commit a0bd68be0f

View File

@ -74,7 +74,7 @@ pub fn main() -> %void {
}; };
defer assert(SDL_RWclose(rw) == 0); defer assert(SDL_RWclose(rw) == 0);
const zig_surface = c.SDL_LoadBMP_RW(rw, 1) ?? { const zig_surface = c.SDL_LoadBMP_RW(rw, 0) ?? {
c.SDL_Log(c"Unable to load bmp: %s", c.SDL_GetError()); c.SDL_Log(c"Unable to load bmp: %s", c.SDL_GetError());
return error.SDLInitializationFailed; return error.SDLInitializationFailed;
}; };