Browse Source

stb_image: Fix issue #994.

Accidentally introduced during a merge.
Fabian Giesen 4 years ago
parent
commit
1203eb554b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      stb_image.h

+ 1 - 1
stb_image.h

@@ -5395,7 +5395,7 @@ static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req
    }
    if (psize == 0) {
       STBI_ASSERT(info.offset == s->callback_already_read + (int) (s->img_buffer - s->img_buffer_original));
-      if (info.offset != s->callback_already_read + (s->img_buffer - s->buffer_start)) {
+      if (info.offset != s->callback_already_read + (s->img_buffer - s->img_buffer_original)) {
         return stbi__errpuc("bad offset", "Corrupt BMP");
       }
    }