Changeset 30942 in webkit for trunk/JavaScriptCore/kjs/identifier.cpp
- Timestamp:
- Mar 10, 2008, 3:06:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/identifier.cpp
r27176 r30942 68 68 const UChar *d = r->data(); 69 69 for (int i = 0; i != length; ++i) 70 if (d[i] .uc!= (unsigned char)s[i])70 if (d[i] != (unsigned char)s[i]) 71 71 return false; 72 72 return s[length] == 0; … … 79 79 const UChar *d = r->data(); 80 80 for (int i = 0; i != length; ++i) 81 if (d[i] .uc != s[i].uc)81 if (d[i] != s[i]) 82 82 return false; 83 83 return true; … … 92 92 const UChar *s = b->data(); 93 93 for (int i = 0; i != length; ++i) 94 if (d[i] .uc != s[i].uc)94 if (d[i] != s[i]) 95 95 return false; 96 96 return true; … … 114 114 UChar *d = static_cast<UChar *>(fastMalloc(sizeof(UChar) * length)); 115 115 for (size_t i = 0; i != length; i++) 116 d[i] = c[i];116 d[i] = static_cast<unsigned char>(c[i]); // use unsigned char to zero-extend instead of sign-extend 117 117 118 118 UString::Rep *r = UString::Rep::create(d, static_cast<int>(length)).releaseRef();
Note:
See TracChangeset
for help on using the changeset viewer.