From a9c5b86f4cdc8ad4194a2cb8adf5c343355cfd30 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sun, 18 Jun 2023 10:45:29 +0200
Subject: [PATCH] avif: fix -Wsign-compare warning
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
---
src/IMG_avif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/IMG_avif.c b/src/IMG_avif.c
index 4f51282b..e5873307 100644
--- a/src/IMG_avif.c
+++ b/src/IMG_avif.c
@@ -199,13 +199,13 @@ static avifResult ReadAVIFIO(struct avifIO * io, uint32_t readFlags, uint64_t of
return AVIF_RESULT_IO_ERROR;
}
- if (size > context->size) {
+ if (size > (Uint64)context->size) {
uint8_t *data = (uint8_t *)SDL_realloc(context->data, size);
if (!data) {
return AVIF_RESULT_IO_ERROR;
}
context->data = data;
- context->size = size;
+ context->size = (Sint64)size;
}
out->data = context->data;