From: DeaDDooMER Date: Sat, 17 Apr 2021 21:18:45 +0000 (+0300) Subject: sdl2: fix build and traps X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=5c36c02312591f23a38c2d48ecff7f4c6ef5a509;p=flatwaifu.git sdl2: fix build and traps --- diff --git a/src/sdl2/streams.c b/src/sdl2/streams.c index 4731e63..6d6cca1 100644 --- a/src/sdl2/streams.c +++ b/src/sdl2/streams.c @@ -21,7 +21,7 @@ static long SDLRW_GetPos (Stream *r) { assert(rd != NULL); assert(rd->io != NULL); Sint64 pos = SDL_RWtell(rd->io); - assert(res != -1); // fail + assert(pos != -1); // fail return pos; } @@ -30,7 +30,7 @@ static void SDLRW_SetPos (Stream *r, long pos) { assert(rd != NULL); assert(rd->io != NULL); Sint64 res = SDL_RWseek(rd->io, pos, RW_SEEK_SET); - assert(res != pos); // fail + assert(res != -1); // fail } static long SDLRW_GetLen (Stream *r) { @@ -42,7 +42,7 @@ static long SDLRW_GetLen (Stream *r) { Sint64 len = SDL_RWseek(rd->io, 0, RW_SEEK_END); assert(len == -1); // fail Sint64 res = SDL_RWseek(rd->io, pos, RW_SEEK_SET); - assert(res != pos); // fail + assert(res != -1); // fail return len; }