image.c: targa_header needn't be global.

as noticed in vkQuake.
This commit is contained in:
Ozkan Sezer 2022-06-26 14:15:32 +03:00
parent 3f251ed5fc
commit 520397d93e

View file

@ -109,9 +109,7 @@ typedef struct targaheader_s {
unsigned char pixel_size, attributes;
} targaheader_t;
#define TARGAHEADERSIZE 18 //size on disk
targaheader_t targa_header;
#define TARGAHEADERSIZE 18 /* size on disk */
int fgetLittleShort (FILE *f)
{
@ -197,6 +195,7 @@ byte *Image_LoadTGA (FILE *fin, int *width, int *height)
int realrow; //johnfitz -- fix for upside-down targas
qboolean upside_down; //johnfitz -- fix for upside-down targas
stdio_buffer_t *buf;
targaheader_t targa_header;
targa_header.id_length = fgetc(fin);
targa_header.colormap_type = fgetc(fin);