Merge pull request #127 from mikesart/master
Fix relative path check for non-Windows platforms in stb_fullpath.
This commit is contained in:
commit
b53c08a148
2
stb.h
2
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user