From f30ace147627b63f3530bd29298bc5c9d6887e9b Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sun, 7 Sep 2025 20:44:14 +0100 Subject: [PATCH] Better warning fix (that doesn't crash) --- code/renderercommon/tr_image_tga.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/renderercommon/tr_image_tga.c b/code/renderercommon/tr_image_tga.c index 619e7d22..c0e95549 100644 --- a/code/renderercommon/tr_image_tga.c +++ b/code/renderercommon/tr_image_tga.c @@ -42,7 +42,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height) { unsigned columns, rows, numPixels; byte *pixbuf; - unsigned row, column; + int row, column; byte *buf_p; byte *end; union { @@ -227,7 +227,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height) *pixbuf++=blue; *pixbuf++=alphabyte; column++; - if (column==columns) { // run spans across rows + if (column==(int)columns) { // run spans across rows column=0; if (row>0) row--; @@ -267,7 +267,7 @@ void R_LoadTGA ( const char *name, byte **pic, int *width, int *height) break; } column++; - if (column==columns) { // pixel packet run spans across rows + if (column==(int)columns) { // pixel packet run spans across rows column=0; if (row>0) row--;