Skip to content

Commit

Permalink
Merge quick fix for #72, thanks to @fgeek
Browse files Browse the repository at this point in the history
  • Loading branch information
saitoha committed Dec 14, 2019
2 parents 93812d6 + 49a6013 commit c868b59
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stb_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,7 @@ static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__
// first scan for DC coefficient, must be first
memset(data,0,64*sizeof(data[0])); // 0 all the ac values now
t = stbi__jpeg_huff_decode(j, hdc);
if (t < 0 || t >= 16) return stbi__err("bad huffman code","Corrupt JPEG");
diff = t ? stbi__extend_receive(j, t) : 0;

dc = j->img_comp[b].dc_pred + diff;
Expand Down

0 comments on commit c868b59

Please sign in to comment.