From b429bee49a2c4d66b092a862e838412529eef627 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 27 Aug 2024 17:40:45 -0700
Subject: [PATCH] Fixed image tests
---
src/IMG.c | 4 ++--
test/main.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
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();