summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 55e863be94..54ad44ae33 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2668,13 +2668,16 @@ isUNCRoot(const char *path)
{
if (path[0] == '\\' && path[1] == '\\') {
const char *p;
- if (p = strchr(path + 3, '\\')) {
- if (!p[1])
- return 0;
- if (p = strchr(p + 1, '\\')) {
- if (!p[1])
- return 1;
- } else
+ for (p = path + 3; *p; p = CharNext(p)) {
+ if (*p == '\\')
+ break;
+ }
+ if (p[0] && p[1]) {
+ for (p++; *p; p = CharNext(p)) {
+ if (*p == '\\')
+ break;
+ }
+ if (!p[0] || !p[1])
return 1;
}
}