Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Warning free SOIL lib.
  • Loading branch information
Matthew Parlane committed Dec 23, 2012
1 parent 1c01fd9 commit a760593
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Externals/SOIL/stb_image_aug.c
Expand Up @@ -2394,13 +2394,15 @@ static int parse_png_file(png *z, int scan, int req_comp)
// if critical, fail
if ((c.type & (1 << 29)) == 0) {
#ifndef STBI_NO_FAILURE_STRINGS
#ifndef STBI_FAILURE_USERMSG
// not threadsafe
static char invalid_chunk[] = "XXXX chunk not known";
invalid_chunk[0] = (uint8) (c.type >> 24);
invalid_chunk[1] = (uint8) (c.type >> 16);
invalid_chunk[2] = (uint8) (c.type >> 8);
invalid_chunk[3] = (uint8) (c.type >> 0);
#endif
#endif
return e(invalid_chunk, "PNG not supported: unknown chunk type");
}
skip(s, c.length);
Expand Down Expand Up @@ -2584,7 +2586,7 @@ static int shiftsigned(int v, int shift, int bits)
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
uint8 *out;
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
unsigned int mr=0,mg=0,mb=0,ma=0;
stbi_uc pal[256][4];
int psize=0,i,j,compress=0,width;
int bpp, flip_vertically, pad, target, offset, hsz;
Expand Down Expand Up @@ -2634,7 +2636,6 @@ static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
mg = 0xff << 8;
mb = 0xff << 0;
ma = 0xff << 24;
fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
} else {
mr = 31 << 10;
mg = 31 << 5;
Expand Down

0 comments on commit a760593

Please sign in to comment.