Fix another site where a stack-allocated character was treated as a
one-element character array. This was safe at this site but potentially confusing. BUG=17103 Review URL: http://codereview.chromium.org/159072 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2126c36279
commit
7c8a166b91
@ -51,9 +51,11 @@ static bool BackRefMatchesNoCase(int from,
|
||||
unibrow::uchar old_char = subject[from++];
|
||||
unibrow::uchar new_char = subject[current++];
|
||||
if (old_char == new_char) continue;
|
||||
interp_canonicalize.get(old_char, '\0', &old_char);
|
||||
interp_canonicalize.get(new_char, '\0', &new_char);
|
||||
if (old_char != new_char) {
|
||||
unibrow::uchar old_string[1] = { old_char };
|
||||
unibrow::uchar new_string[1] = { new_char };
|
||||
interp_canonicalize.get(old_char, '\0', old_string);
|
||||
interp_canonicalize.get(new_char, '\0', new_string);
|
||||
if (old_string[0] != new_string[0]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user