Parcourir la source

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

Michael Sartain il y a 10 ans
Parent
commit
3787e1c143
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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
    return _fullpath(abs, rel, abs_size) != NULL;
    #else
-   if (abs[0] == '/' || abs[0] == '~') {
+   if (rel[0] == '/' || rel[0] == '~') {
       if ((int) strlen(rel) >= abs_size)
          return 0;
       strcpy(abs,rel);