don't free the rwop twice

This commit is contained in:
Andrew Kelley 2017-10-25 23:42:16 -04:00
parent 4ab4e4f58b
commit 7e4872a02c

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;
}; };