Skip to content

Commit

Permalink
fixup! Add functionality for converting UNIX paths in arguments and e…
Browse files Browse the repository at this point in the history
…nvironment variables to Windows form for native Win32 applications.

Don't memchr behind end, it+1
  • Loading branch information
dg0yt authored and dscho committed Nov 22, 2023
1 parent 78f82c3 commit 0e7d075
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en

path_type result = NONE;

if (it + 1 == end) {
switch (*it) {
case '/': return ROOTED_PATH ;
default: return SIMPLE_WINDOWS_PATH;
}
}

if (isalpha(*it) && *(it + 1) == ':') {
if (*(it + 2) == '\\') {
return SIMPLE_WINDOWS_PATH;
Expand Down

0 comments on commit 0e7d075

Please sign in to comment.