We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15b57fb commit 08ed65fCopy full SHA for 08ed65f
1 file changed
common/stb_image.patch
@@ -35,7 +35,7 @@
35
+ void *STBI_REALLOC_buf = (x); \
36
+ size_t STBI_REALLOC_alloc_size = (y); \
37
+ void *STBI_REALLOC_new_buf = STBI_MALLOC(STBI_REALLOC_alloc_size); \
38
-+ size_t STBI_REALLOC_old_size = *(size_t *)((void *)STBI_REALLOC_buf - 16); \
++ size_t STBI_REALLOC_old_size = (*(size_t *)((void *)STBI_REALLOC_buf - 16)) - 16; \
39
+ if (STBI_REALLOC_buf != NULL) { \
40
+ memcpy(STBI_REALLOC_new_buf, STBI_REALLOC_buf, \
41
+ MIN(STBI_REALLOC_alloc_size, STBI_REALLOC_old_size)); \
0 commit comments