Skip to content

Commit 750aec7

Browse files
committed
Merge pull request #25 from anubhavp28:small-fix
PiperOrigin-RevId: 265062634
2 parents 0892ec9 + 85202d3 commit 750aec7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

robots.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ class RobotsMatchStrategy {
9999
} else {
100100
// Includes '$' when not at end of pattern.
101101
int newnumpos = 0;
102-
const size_t len = path.length();
103102
for (int i = 0; i < numpos; i++) {
104-
if (pos[i] < len && path[pos[i]] == *pat) {
103+
if (pos[i] < pathlen && path[pos[i]] == *pat) {
105104
pos[newnumpos++] = pos[i] + 1;
106105
}
107106
}

0 commit comments

Comments
 (0)