소스 검색

Fix relative path check for non-Windows platforms in stb_fullpath.

Michael Sartain 10 년 전
부모
커밋
3787e1c143
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      stb.h

+ 1 - 1
stb.h

@@ -5255,7 +5255,7 @@ int stb_fullpath(char *abs, int abs_size, char *rel)
    #ifdef _MSC_VER
    #ifdef _MSC_VER
    return _fullpath(abs, rel, abs_size) != NULL;
    return _fullpath(abs, rel, abs_size) != NULL;
    #else
    #else
-   if (abs[0] == '/' || abs[0] == '~') {
+   if (rel[0] == '/' || rel[0] == '~') {
       if ((int) strlen(rel) >= abs_size)
       if ((int) strlen(rel) >= abs_size)
          return 0;
          return 0;
       strcpy(abs,rel);
       strcpy(abs,rel);