mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-07 11:58:13 +00:00
@@ -1406,6 +1406,10 @@ static Font LoadBMFont(const char *fileName)
|
|||||||
char *lastSlash = NULL;
|
char *lastSlash = NULL;
|
||||||
|
|
||||||
lastSlash = strrchr(fileName, '/');
|
lastSlash = strrchr(fileName, '/');
|
||||||
|
if (lastSlash == NULL)
|
||||||
|
{
|
||||||
|
lastSlash = strrchr(fileName, '\\');
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE: We need some extra space to avoid memory corruption on next allocations!
|
// NOTE: We need some extra space to avoid memory corruption on next allocations!
|
||||||
texPath = malloc(strlen(fileName) - strlen(lastSlash) + strlen(texFileName) + 4);
|
texPath = malloc(strlen(fileName) - strlen(lastSlash) + strlen(texFileName) + 4);
|
||||||
|
Reference in New Issue
Block a user