Pārlūkot izejas kodu

fixed LoadCodepoints returning a freed ptr when count is 0 (#4089)

pull/4092/head
Alice Nyaa pirms 7 mēnešiem
committed by GitHub
vecāks
revīzija
b0d49579c1
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: B5690EEEBB952194
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. +1
    -2
      src/rtext.c

+ 1
- 2
src/rtext.c Parādīt failu

@ -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;

Notiek ielāde…
Atcelt
Saglabāt