From 0f37321de721e1b543ca83721a1d1df1cc1b6b55 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 29 Sep 2014 07:34:39 +0000 Subject: [PATCH] [NTOSKRNL] Fix a bug I introduced in r64369. CORE-8573 svn path=/trunk/; revision=64385 --- reactos/ntoskrnl/fsrtl/name.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/ntoskrnl/fsrtl/name.c b/reactos/ntoskrnl/fsrtl/name.c index e833a7a8a11..38ccca4162b 100644 --- a/reactos/ntoskrnl/fsrtl/name.c +++ b/reactos/ntoskrnl/fsrtl/name.c @@ -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])