Chromium Code Reviews| Index: runtime/vm/object.cc |
| =================================================================== |
| --- runtime/vm/object.cc (revision 11257) |
| +++ runtime/vm/object.cc (working copy) |
| @@ -9267,7 +9267,10 @@ |
| ASSERT(!str.IsNull()); |
| ASSERT(begin_index >= 0); |
| ASSERT(length >= 0); |
| - if (begin_index >= str.Length()) { |
| + if (begin_index <= str.Length() && length == 0) { |
| + return Symbols::Empty(); |
| + } |
| + if (begin_index > str.Length()) { |
| return String::null(); |
| } |
| String& result = String::Handle(); |