From ace6920d4433599e99083892fc12495239ee3d61 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 27 Aug 2024 22:34:35 -0700
Subject: [PATCH] Fixed returning -1 in a function returning bool
---
src/test/SDL_test_font.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/SDL_test_font.c b/src/test/SDL_test_font.c
index 92594423cb74a..f977ab4438819 100644
--- a/src/test/SDL_test_font.c
+++ b/src/test/SDL_test_font.c
@@ -3205,7 +3205,7 @@ SDL_bool SDLTest_DrawCharacter(SDL_Renderer *renderer, float x, float y, Uint32
*/
character = SDL_CreateSurface(charWidth, charHeight, SDL_PIXELFORMAT_RGBA8888);
if (!character) {
- return -1;
+ return SDL_FALSE;
}
charpos = SDLTest_FontData + ci * 8;
@@ -3237,7 +3237,7 @@ SDL_bool SDLTest_DrawCharacter(SDL_Renderer *renderer, float x, float y, Uint32
* Check pointer
*/
if (cache->charTextureCache[ci] == NULL) {
- return -1;
+ return SDL_FALSE;
}
SDL_SetTextureScaleMode(cache->charTextureCache[ci], SDL_SCALEMODE_NEAREST);