From 95372dc4f881900e51284f85c63312d75aee8f17 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Wed, 7 Jul 2021 00:29:19 -0700 Subject: [PATCH] stb.h: fix bug in stb_readdir caused by change to stb_strncpy --- deprecated/stb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/deprecated/stb.h b/deprecated/stb.h index 03aec96..06f3168 100644 --- a/deprecated/stb.h +++ b/deprecated/stb.h @@ -9230,6 +9230,7 @@ int stb__wildmatch_raw(char *expr, char *candidate, int search, int insensitive) // need to allow for non-writeable strings... assume they're small if (s - last < 256) { stb_strncpy(buffer, last, (int) (s-last+1)); + buffer[s-last] = 0; z = stb__wildmatch_raw2(buffer, candidate, search, insensitive); } else { *s = 0;