if (fname) fname[0] = '\0';
if (ext) ext[0] = '\0';
+#if WINVER >= 0x600
/* Check parameter */
if (!path)
{
- //__set_errno(EINVAL);
+#ifndef _LIBCNT_
+ _set_errno(EINVAL);
+#endif
return;
}
+#endif
+ //_Analysis_assume_(path != 0);
+
+#if WINVER == 0x600
/* Skip '\\?\' prefix */
if ((path[0] == '\\') && (path[1] == '\\') &&
(path[2] == '?') && (path[3] == '\\')) path += 4;
+#endif
if (path[0] == '\0') return;
path++;
}
- /* Check if we got */
- if (!file_start) file_start = path;
- if (!ext_start || ext_start < file_start) ext_start = path;
+ /* Check if we got a file name / extension */
+ if (!file_start)
+ file_start = dir_start;
+ if (!ext_start || ext_start < file_start)
+ ext_start = path;
if (dir)
{