From 54f18be44dec763d9c283aabc8bbf9d12b06346f Mon Sep 17 00:00:00 2001
From: Paul Vriens <Paul.Vriens@xs4all.nl>
Date: Fri, 18 Aug 2006 10:57:40 +0200
Subject: [PATCH] ntdll: Fix failing test on windows.

---
 dlls/ntdll/path.c       | 2 +-
 dlls/ntdll/tests/path.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index 78ee9fd51c1..84c15a45741 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -339,7 +339,7 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name )
     }
 
     end = dos_name + strlenW(dos_name) - 1;
-    if (end >= dos_name && *end == ':') end--;  /* remove trailing ':' */
+    while (end >= dos_name && *end == ':') end--;  /* remove all trailing ':' */
 
     /* find start of file name */
     for (start = end; start >= dos_name; start--)
diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index 14af1cfe3bd..14546f39f81 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.c
@@ -101,7 +101,8 @@ static void test_RtlIsDosDeviceName(void)
         { "",              0, 0 },
         { "\\\\foo\\nul",  0, 0 },
         { "c:\\nul:",      6, 6 },
-        { "c:\\nul::",     0, 0 },
+        { "c:\\nul::",     6, 6 },
+        { "c:\\nul::::::", 6, 6 },
         { "c:prn     ",    4, 6 },
         { "c:prn.......",  4, 6 },
         { "c:prn... ...",  4, 6 },