[NTOSKRNL]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 29 Sep 2014 07:34:39 +0000 (07:34 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 29 Sep 2014 07:34:39 +0000 (07:34 +0000)
Fix a bug I introduced in r64369.
CORE-8573

svn path=/trunk/; revision=64385

reactos/ntoskrnl/fsrtl/name.c

index e833a7a..38ccca4 100644 (file)
@@ -130,13 +130,6 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
                 ExpressionPosition++;
             }
 
-            /* If star is at the end, then eat all rest and leave */
-            if (ExpressionPosition == Expression->Length / sizeof(WCHAR))
-            {
-                NamePosition = Name->Length / sizeof(WCHAR);
-                break;
-            }
-
             /* Save star position */
             StarFound++;
             if (StarFound >= BackTrackingSize)
@@ -150,6 +143,13 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
             }
             BackTracking[StarFound] = ExpressionPosition++;
 
+            /* If star is at the end, then eat all rest and leave */
+            if (ExpressionPosition == Expression->Length / sizeof(WCHAR))
+            {
+                NamePosition = Name->Length / sizeof(WCHAR);
+                break;
+            }
+
             /* Allow null matching */
             if (Expression->Buffer[ExpressionPosition] != L'?' &&
                      Expression->Buffer[ExpressionPosition] != Name->Buffer[NamePosition])