From bc4e96b5a7beede4403980bc4d32d0a65ee1a53d Mon Sep 17 00:00:00 2001 From: Fabian Giesen Date: Thu, 1 Jul 2021 17:11:25 -0700 Subject: [PATCH] stb_image: Fix issue #994. Accidentally introduced during a merge. --- stb_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_image.h b/stb_image.h index accef48..0a8622b 100644 --- a/stb_image.h +++ b/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"); } }