From 6f3ef22d19925a40f912919778b69c7e570bbc43 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 22 Sep 2025 11:27:23 -0700 Subject: [PATCH] Fixed build warning --- test/testautomation_blit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/testautomation_blit.c b/test/testautomation_blit.c index a461005c5a..85a96fd67c 100644 --- a/test/testautomation_blit.c +++ b/test/testautomation_blit.c @@ -88,7 +88,10 @@ Uint32 FNVHash(Uint32* buf, int length) { * Wraps the FNV-1a hash for an input surface's pixels */ Uint32 hashSurfacePixels(SDL_Surface * surface) { - Uint64 buffer_size = surface->w * surface->h; + int buffer_size = surface->w * surface->h; + if (buffer_size < 0) { + return 0; + } return FNVHash(surface->pixels, buffer_size); } /* ================= Test Case Implementation ================== */