From 5aa7a983f1f49e4989923d34fc2db653a4773445 Mon Sep 17 00:00:00 2001 From: a-iga Date: Tue, 15 Jun 2021 00:18:56 +0900 Subject: [PATCH] stbi: fix error not matching with assertion (#10454) --- thirdparty/stb_image/stb_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/stb_image/stb_image.h b/thirdparty/stb_image/stb_image.h index 43784617d4..816511caa0 100644 --- a/thirdparty/stb_image/stb_image.h +++ b/thirdparty/stb_image/stb_image.h @@ -5399,7 +5399,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 + (int) (s->img_buffer - s->img_buffer_original)) { return stbi__errpuc("bad offset", "Corrupt BMP"); } }