From 2b25f2f8cd75208cedb424dcca375925f642b37c Mon Sep 17 00:00:00 2001 From: Mikhail Morozov Date: Wed, 17 May 2023 18:47:15 +0300 Subject: [PATCH] stb_image: fix warning in clang --- stb_image.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stb_image.h b/stb_image.h index 3e05a7db49..3bb7c5b772 100644 --- a/stb_image.h +++ b/stb_image.h @@ -7574,8 +7574,8 @@ static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req filesize = s->img_n * s->img_x * s->img_y; while(filesize--) { // Convert from BIG-ENDIAN - // p[0]*256+p[1] - *(p16++) = *(p8++) + *(p8++)*256; + *(p16++) = p8[1] + p8[0]*256; + p8 += 2; } } }