From b92557c0b7a66fcfac9e13aef96d446b8b289887 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 6 Oct 2025 09:22:34 -0700
Subject: [PATCH] Made error message consistent between SDL_SetSurfacePalette()
and SDL_SetTexturePalette()
---
src/render/SDL_render.c | 2 +-
src/video/SDL_surface.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 44f293c05dc50..aeb3424b13cac 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1918,7 +1918,7 @@ bool SDL_SetTexturePalette(SDL_Texture *texture, SDL_Palette *palette)
}
CHECK_PARAM(palette && palette->ncolors > (1 << SDL_BITSPERPIXEL(texture->format))) {
- return SDL_SetError("SDL_SetSurfacePalette() passed a palette that doesn't match the surface format");
+ return SDL_SetError("Palette doesn't match surface format");
}
if (palette != texture->public_palette) {
diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c
index 60221c88b75f1..f2cffae99f4f1 100644
--- a/src/video/SDL_surface.c
+++ b/src/video/SDL_surface.c
@@ -421,7 +421,7 @@ bool SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
}
CHECK_PARAM(palette && palette->ncolors > (1 << SDL_BITSPERPIXEL(surface->format))) {
- return SDL_SetError("SDL_SetSurfacePalette() passed a palette that doesn't match the surface format");
+ return SDL_SetError("Palette doesn't match surface format");
}
if (palette != surface->palette) {