Skip to content

Commit

Permalink
GitWildcardMatch minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmauro committed May 18, 2023
1 parent 30d02a7 commit f785514
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Miscellaneous.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ BOOL GitWildcardMatch(_In_ LPCWSTR szTextW, _In_ SIZE_T nTextLen, _In_ LPCWSTR s
nPattern1Backup = (SIZE_T)-1;
nText2Backup = nTextOfs;
nPattern2Backup = nPatternOfs;
if (szTextW[nTextOfs] == L'\\')
if (szTextW[nTextOfs] != L'\\')
nPatternOfs++;
continue;
}
Expand Down Expand Up @@ -250,7 +250,7 @@ BOOL GitWildcardMatch(_In_ LPCWSTR szTextW, _In_ SIZE_T nTextLen, _In_ LPCWSTR s
continue;
}
}
if (nPattern1Backup != (SIZE_T)-1 && szPatternW[nPattern1Backup] != L'\\')
if (nPattern1Backup != (SIZE_T)-1 && szTextW[nText1Backup] != L'\\')
{
// *-loop: backtrack to the last * but do not jump over /
nTextOfs = ++nText1Backup;
Expand Down

0 comments on commit f785514

Please sign in to comment.