mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[NTOSKRNL]
Nearly properly reimplement DOT_STAR in FsRtlIs*InExpression. Should fix tests broken by hackfix svn path=/trunk/; revision=58818
This commit is contained in:
parent
e25146372d
commit
4e5c5772f1
2 changed files with 76 additions and 10 deletions
|
@ -218,14 +218,47 @@ FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
|
|||
/* Check DOS_STAR */
|
||||
else if (Expression->Buffer[ExpressionPosition] == ANSI_DOS_STAR)
|
||||
{
|
||||
MatchingChars = NamePosition;
|
||||
while (MatchingChars < Name->Length)
|
||||
/* We can only consume dot if that's not the last one
|
||||
* Otherwise, we null match
|
||||
*/
|
||||
if (Name->Buffer[NamePosition] == '.')
|
||||
{
|
||||
if (Name->Buffer[MatchingChars] == '.')
|
||||
MatchingChars = NamePosition + 1;
|
||||
while (MatchingChars < Name->Length)
|
||||
{
|
||||
NamePosition = MatchingChars;
|
||||
if (Name->Buffer[MatchingChars] == '.')
|
||||
{
|
||||
NamePosition++;
|
||||
break;
|
||||
}
|
||||
MatchingChars++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* XXX: Eat everything till the end */
|
||||
if (ExpressionPosition + 1 == Expression->Length)
|
||||
{
|
||||
NamePosition = Name->Length;
|
||||
}
|
||||
|
||||
/* Try to eat till the next matching char or . */
|
||||
MatchingChars = NamePosition;
|
||||
while (MatchingChars < Name->Length)
|
||||
{
|
||||
if (ExpressionPosition + 1 < Expression->Length &&
|
||||
Name->Buffer[MatchingChars] == Expression->Buffer[ExpressionPosition + 1])
|
||||
{
|
||||
NamePosition = MatchingChars;
|
||||
break;
|
||||
}
|
||||
else if (Name->Buffer[MatchingChars] == '.')
|
||||
{
|
||||
NamePosition = MatchingChars + 1;
|
||||
break;
|
||||
}
|
||||
MatchingChars++;
|
||||
}
|
||||
MatchingChars++;
|
||||
}
|
||||
ExpressionPosition++;
|
||||
}
|
||||
|
|
|
@ -153,14 +153,47 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
|
|||
/* Check DOS_STAR */
|
||||
else if (Expression->Buffer[ExpressionPosition] == DOS_STAR)
|
||||
{
|
||||
MatchingChars = NamePosition;
|
||||
while (MatchingChars < Name->Length / sizeof(WCHAR))
|
||||
/* We can only consume dot if that's not the last one
|
||||
* Otherwise, we null match
|
||||
*/
|
||||
if (Name->Buffer[NamePosition] == L'.')
|
||||
{
|
||||
if (Name->Buffer[MatchingChars] == L'.')
|
||||
MatchingChars = NamePosition + 1;
|
||||
while (MatchingChars < Name->Length / sizeof(WCHAR))
|
||||
{
|
||||
NamePosition = MatchingChars;
|
||||
if (Name->Buffer[MatchingChars] == L'.')
|
||||
{
|
||||
NamePosition++;
|
||||
break;
|
||||
}
|
||||
MatchingChars++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* XXX: Eat everything till the end */
|
||||
if (ExpressionPosition + 1 == Expression->Length / sizeof(WCHAR))
|
||||
{
|
||||
NamePosition = Name->Length;
|
||||
}
|
||||
|
||||
/* Try to eat till the next matching char or . */
|
||||
MatchingChars = NamePosition;
|
||||
while (MatchingChars < Name->Length / sizeof(WCHAR))
|
||||
{
|
||||
if (ExpressionPosition + 1 < Expression->Length / sizeof(WCHAR) &&
|
||||
Name->Buffer[MatchingChars] == Expression->Buffer[ExpressionPosition + 1])
|
||||
{
|
||||
NamePosition = MatchingChars;
|
||||
break;
|
||||
}
|
||||
else if (Name->Buffer[MatchingChars] == L'.')
|
||||
{
|
||||
NamePosition = MatchingChars + 1;
|
||||
break;
|
||||
}
|
||||
MatchingChars++;
|
||||
}
|
||||
MatchingChars++;
|
||||
}
|
||||
ExpressionPosition++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue