From 7ada8c1db231c98a63f74755f68c7e8cc296c38e Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 21 Jun 2022 03:55:02 +0300
Subject: [PATCH] IMG_xcf.c: fixed a minor Watcom warning.
---
IMG_xcf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/IMG_xcf.c b/IMG_xcf.c
index d19b403d..98521b8c 100644
--- a/IMG_xcf.c
+++ b/IMG_xcf.c
@@ -519,7 +519,7 @@ static void free_xcf_tile (unsigned char * t) {
static unsigned char * load_xcf_tile_none (SDL_RWops * src, Uint64 len, int bpp, int x, int y) {
unsigned char * load = NULL;
- if (len <= SDL_SIZE_MAX) {
+ if (len <= (Uint64)SDL_SIZE_MAX) {
load = (unsigned char *) SDL_malloc ((size_t)len); // expect this is okay
}
if (load != NULL)
@@ -533,7 +533,7 @@ static unsigned char * load_xcf_tile_rle (SDL_RWops * src, Uint64 len, int bpp,
int i, size, count, j, length;
unsigned char val;
- if (len == 0 || len > SDL_SIZE_MAX) { /* probably bogus data. */
+ if (len == 0 || len > (Uint64)SDL_SIZE_MAX) { /* probably bogus data. */
return NULL;
}