소스 검색

Merge pull request #749 from Syphonx/master

LoadBMFont filepath fix
Ray 6 년 전
부모
커밋
dde99f45d9
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);