瀏覽代碼

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

pull/4092/head
Alice Nyaa 7 月之前
committed by GitHub
父節點
當前提交
b0d49579c1
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. +1
    -2
      src/rtext.c

+ 1
- 2
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;

Loading…
取消
儲存