提交 ef861421 编写于 作者: S Sean Barrett

stb.h: stb_splitpath correctly handles relative paths with explicit drive specifiers

上级 59e7dec3
......@@ -2423,6 +2423,12 @@ static char *stb__splitpath_raw(char *buffer, char *path, int flag)
char *s = stb_strrchr2(path, '/', '\\');
char *t = strrchr(path, '.');
if (s && t && t < s) t = NULL;
if (!s) {
// check for drive
if (isalpha(path[0]) && path[1] == ':')
s = &path[1];
}
if (s) ++s;
if (flag == STB_EXT_NO_PERIOD)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册