Reviewers: plesner, Description: 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 Please review this at http://codereview.chromium.org/159072 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/interpreter-irregexp.cc Index: src/interpreter-irregexp.cc =================================================================== --- src/interpreter-irregexp.cc (revision 2509) +++ src/interpreter-irregexp.cc (working copy) @@ -51,9 +51,11 @@ 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; } } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
