From 8794d150e2b2e993b64713e6d05e12c086b42cda Mon Sep 17 00:00:00 2001 From: Minnowo <62451415+Minnowo@users.noreply.github.com> Date: Sat, 22 Jun 2024 00:27:11 -0400 Subject: [PATCH] fixed LoadCodepoints returning a freed ptr when count is 0 --- src/rtext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rtext.c b/src/rtext.c index 6ad0f90a0..62d786eac 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1892,8 +1892,7 @@ int *LoadCodepoints(const char *text, int *count) } // Re-allocate buffer to the actual number of codepoints loaded - int *temp = (int *)RL_REALLOC(codepoints, codepointCount*sizeof(int)); - if (temp != NULL) codepoints = temp; + codepoints = (int *)RL_REALLOC(codepoints, codepointCount*sizeof(int)); *count = codepointCount;