diff --git a/src/IMG.c b/src/IMG.c index 45793fda..b7451559 100644 --- a/src/IMG.c +++ b/src/IMG.c @@ -244,7 +244,7 @@ SDL_Surface *IMG_LoadTyped_IO(SDL_IOStream *src, SDL_bool closeio, const char *t continue; } else { /* magicless format */ - if (!type || !SDL_strcasecmp(type, supported[i].type)) + if (!type || SDL_strcasecmp(type, supported[i].type) != 0) continue; } #ifdef DEBUG_IMGLIB @@ -348,7 +348,7 @@ IMG_Animation *IMG_LoadAnimationTyped_IO(SDL_IOStream *src, SDL_bool closeio, co continue; } else { /* magicless format */ - if (!type || !SDL_strcasecmp(type, supported_anims[i].type)) + if (!type || SDL_strcasecmp(type, supported_anims[i].type) != 0) continue; } #ifdef DEBUG_IMGLIB diff --git a/test/main.c b/test/main.c index 69cab49d..dab789ee 100644 --- a/test/main.c +++ b/test/main.c @@ -801,7 +801,7 @@ FormatSaveTest(const Format *format, SDL_IOStream *dest = NULL; int initResult = 0; int diff; - int result; + SDL_bool result; SDL_snprintf(filename, sizeof(filename), "save%s.%s", @@ -867,7 +867,7 @@ FormatSaveTest(const Format *format, goto out; } - SDLTest_AssertCheck(result == 0, "Save %s (%s)", filename, SDL_GetError()); + SDLTest_AssertCheck(result, "Save %s (%s)", filename, SDL_GetError()); if (format->canLoad) { SDL_ClearError();