瀏覽代碼

`LoadText()` tweak (#1113)

Guarantee string is zero-terminated
pull/1118/head
brankoku 5 年之前
committed by GitHub
父節點
當前提交
572969d8b7
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      src/rlgl.h

+ 3
- 1
src/rlgl.h 查看文件

@ -3013,8 +3013,10 @@ char *LoadText(const char *fileName)
if (count < size)
{
text = RL_REALLOC(text, count + 1);
text[count] = '\0';
}
// zero-terminate the string
text[count] = '\0';
}
fclose(textFile);

Loading…
取消
儲存