Skip to content

Commit

Permalink
stb_image: fix previously introduced warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
plzombie committed May 16, 2023
1 parent 9ec45a1 commit 6858734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stb_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -7531,7 +7531,7 @@ static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req
ri->bits_per_channel = 8;
line = s->img_x/8+((s->img_x%8>0)?1:0);

filebuf = stbi__malloc_mad2(line, s->img_y, 0);
filebuf = (stbi_uc *) stbi__malloc_mad2(line, s->img_y, 0);
if (!filebuf) {
STBI_FREE(out);
return stbi__errpuc("outofmem", "Out of memory");
Expand All @@ -7548,7 +7548,7 @@ static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req
for(y = 0; y < s->img_y; y++) {
for(x = 0; x < s->img_x; x++) {
offset--;
*(p_out++) = ((*p_in>>offset)&0x1>0)?0:255;
*(p_out++) = ((*p_in>>offset)&0x1)?0:255;
if(offset == 0) {
offset = 8;
p_in++;
Expand Down

0 comments on commit 6858734

Please sign in to comment.