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

This commit is contained in:
Michael Sartain 2015-06-09 16:52:39 -07:00
parent aa89970d6b
commit 3787e1c143
1 changed files with 1 additions and 1 deletions

2
stb.h
View File

@ -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);