From 40219a6762596f698c388cccd6b4822ff2fa4908 Mon Sep 17 00:00:00 2001
From: stjepano <[EMAIL REDACTED]>
Date: Wed, 11 Dec 2024 11:23:46 +0100
Subject: [PATCH] Fix SDL_memcmp argument mismatch in SDL_ttf.c
Corrected the SDL_memcmp function to compare the 'string' argument instead of 'text', ensuring proper string comparison logic. This resolves potential functional issues caused by the incorrect argument usage.
---
src/SDL_ttf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index 747dbee5..ec142f55 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -4317,7 +4317,7 @@ bool TTF_SetTextString(TTF_Text *text, const char *string, size_t length)
length = SDL_strlen(string);
}
- if (text->text && length == SDL_strlen(text->text) && SDL_memcmp(text, text->text, length) == 0) {
+ if (text->text && length == SDL_strlen(text->text) && SDL_memcmp(string, text->text, length) == 0) {
return true;
}