Merge pull request #749 from Syphonx/master

LoadBMFont filepath fix
This commit is contained in:
Ray
2019-02-10 23:52:52 +01:00
committed by GitHub

View File

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