Skip to content

Commit

Permalink
Fixed image tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 28, 2024
1 parent e0c7621 commit b429bee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/IMG.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit b429bee

Please sign in to comment.