浏览代码

stb_image: JPEG: Accept non-zero junk bytes at the end of image data

Jeremy Sawicki 8 年之前
父节点
当前提交
6f5677946c
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      stb_image.h

+ 0 - 2
stb_image.h

@@ -3123,8 +3123,6 @@ static int stbi__decode_jpeg_image(stbi__jpeg *j)
                if (x == 255) {
                   j->marker = stbi__get8(j->s);
                   break;
-               } else if (x != 0) {
-                  return stbi__err("junk before marker", "Corrupt JPEG");
                }
             }
             // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0