From 1c97053675c18196dd228f4b8407e9659f0dd994 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Mon, 4 Nov 2024 08:09:15 +0300 Subject: [PATCH] stb_ds.h: fix STBDS_FREE used outside of implementation --- third-party/stb/stb_ds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/stb/stb_ds.h b/third-party/stb/stb_ds.h index 21c96b9..fc0286e 100644 --- a/third-party/stb/stb_ds.h +++ b/third-party/stb/stb_ds.h @@ -548,7 +548,7 @@ extern void * stbds_shmode_func(size_t elemsize, int mode); #define stbds_arraddnindex(a,n)(stbds_arrmaybegrow(a,n), (n) ? (stbds_header(a)->length += (n), stbds_header(a)->length-(n)) : stbds_arrlen(a)) #define stbds_arraddnoff stbds_arraddnindex #define stbds_arrlast(a) ((a)[stbds_header(a)->length-1]) -#define stbds_arrfree(a) ((void) ((a) ? STBDS_FREE(NULL,stbds_header(a)) : (void)0), (a)=NULL) +#define stbds_arrfree(a) ((void) ((a) ? stbds_arrfreef(a) : (void)0), (a)=NULL) #define stbds_arrdel(a,i) stbds_arrdeln(a,i,1) #define stbds_arrdeln(a,i,n) (memmove(&(a)[i], &(a)[(i)+(n)], sizeof *(a) * (stbds_header(a)->length-(n)-(i))), stbds_header(a)->length -= (n)) #define stbds_arrdelswap(a,i) ((a)[i] = stbds_arrlast(a), stbds_header(a)->length -= 1)