diff options
| author | Ray <raysan5@gmail.com> | 2019-02-10 23:52:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-10 23:52:52 +0100 |
| commit | dde99f45d95f06445abe3ca1da96a50cb1381dfa (patch) | |
| tree | 9c600f0268da3e39c6efc1d63847f365bcfdbe54 /src | |
| parent | 366313bfd03c413c60386d51425c34cf9a78afba (diff) | |
| parent | 1e15616b694750def089c74b7a29ad95da4544a0 (diff) | |
| download | raylib-dde99f45d95f06445abe3ca1da96a50cb1381dfa.tar.gz raylib-dde99f45d95f06445abe3ca1da96a50cb1381dfa.zip | |
Merge pull request #749 from Syphonx/master
LoadBMFont filepath fix
Diffstat (limited to 'src')
| -rw-r--r-- | src/text.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |
