mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-06 00:10:25 +00:00
bug 329165 use an unsigned array index
r+sr+a=darin
This commit is contained in:
parent
b5b10cc68f
commit
06bb1a4136
@ -123,9 +123,11 @@ static PRBool IsValidToken(const nsCString &s)
|
||||
if (start == end)
|
||||
return PR_FALSE;
|
||||
|
||||
for (; start != end; ++start)
|
||||
if (((unsigned char) *start) > 127 || !kValidTokenMap[*start])
|
||||
for (; start != end; ++start) {
|
||||
const unsigned char idx = *start;
|
||||
if (idx > 127 || !kValidTokenMap[idx])
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user