浏览代码

Merge pull request #749 from Syphonx/master

LoadBMFont filepath fix
pull/755/head
Ray 5 年前
committed by GitHub
父节点
当前提交
dde99f45d9
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      src/text.c

+ 4
- 0
src/text.c 查看文件

@ -1406,6 +1406,10 @@ static Font LoadBMFont(const char *fileName)
char *lastSlash = NULL;
lastSlash = strrchr(fileName, '/');
if (lastSlash == NULL)
{
lastSlash = strrchr(fileName, '\\');
}
// NOTE: We need some extra space to avoid memory corruption on next allocations!
texPath = malloc(strlen(fileName) - strlen(lastSlash) + strlen(texFileName) + 4);

正在加载...
取消
保存