diff options
Diffstat (limited to '')
-rw-r--r-- | CPP/Common/Wildcard.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/CPP/Common/Wildcard.cpp b/CPP/Common/Wildcard.cpp index 861f3f7..798cbd9 100644 --- a/CPP/Common/Wildcard.cpp +++ b/CPP/Common/Wildcard.cpp | |||
@@ -125,8 +125,8 @@ static bool EnhancedMaskTest(const wchar_t *mask, const wchar_t *name) | |||
125 | { | 125 | { |
126 | for (;;) | 126 | for (;;) |
127 | { | 127 | { |
128 | wchar_t m = *mask; | 128 | const wchar_t m = *mask; |
129 | wchar_t c = *name; | 129 | const wchar_t c = *name; |
130 | if (m == 0) | 130 | if (m == 0) |
131 | return (c == 0); | 131 | return (c == 0); |
132 | if (m == '*') | 132 | if (m == '*') |
@@ -526,12 +526,10 @@ int CCensor::FindPairForPrefix(const UString &prefix) const | |||
526 | 526 | ||
527 | bool IsDriveColonName(const wchar_t *s) | 527 | bool IsDriveColonName(const wchar_t *s) |
528 | { | 528 | { |
529 | wchar_t c = s[0]; | 529 | unsigned c = s[0]; |
530 | return c != 0 | 530 | c |= 0x20; |
531 | && s[1] == ':' | 531 | c -= 'a'; |
532 | && s[2] == 0 | 532 | return c <= (unsigned)('z' - 'a') && s[1] == ':' && s[2] == 0; |
533 | && ((c >= 'a' && c <= 'z') | ||
534 | || (c >= 'A' && c <= 'Z')); | ||
535 | } | 533 | } |
536 | 534 | ||
537 | unsigned GetNumPrefixParts_if_DrivePath(UStringVector &pathParts) | 535 | unsigned GetNumPrefixParts_if_DrivePath(UStringVector &pathParts) |