Fix length of pattern.

After skipping * with "token++", the length should decrease by 1 as
well.

Change-Id: I132eb7d12bb756f2f713c607e92741ca834aef81
This commit is contained in:
Ying Wang
2012-05-22 11:24:22 -07:00
parent 0eaeb69d1c
commit 996b073e81

View File

@@ -122,6 +122,7 @@ static bool isHidden(const char *root, const char *path)
if (token[0] == '*') {
// Match *suffix
token++;
n--;
if (n <= plen) {
ignore = strncasecmp(token, path + plen - n, n) == 0;
}