Changeset 29503 in webkit for trunk/JavaScriptCore/kjs/string_object.cpp
- Timestamp:
- Jan 15, 2008, 5:22:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/string_object.cpp
r29067 r29503 733 733 JSValue* a1 = args[1]; 734 734 735 double d = 0.0;736 737 735 double start = a0->toInteger(exec); 738 736 double length = a1->isUndefined() ? len : a1->toInteger(exec); … … 746 744 start = 0; 747 745 } 748 if (length > len - d)749 length = len - d;746 if (length > len) 747 length = len; 750 748 return jsString(s.substr(static_cast<int>(start), static_cast<int>(length))); 751 749 }
Note:
See TracChangeset
for help on using the changeset viewer.