Skip to content

Commit

Permalink
stb_image.h: fix build in C90 mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Oct 16, 2023
1 parent 164a13a commit bceb94e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/stb_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -1336,13 +1336,14 @@ static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int byt

static unsigned char *stbi__load_indexed(stbi__context *s, int *x, int *y, unsigned int *palette_buffer, int palette_buffer_len)
{
if (!palette_buffer)
return NULL;

stbi__result_info ri;
int comp;
void *result = stbi__load_main(s, x, y, &comp, 1, &ri, 8, palette_buffer, palette_buffer_len);
void *result;

if (!palette_buffer)
return NULL;

result = stbi__load_main(s, x, y, &comp, 1, &ri, 8, palette_buffer, palette_buffer_len);
if (result == NULL)
return NULL;

Expand Down

0 comments on commit bceb94e

Please sign in to comment.