Index: src/heap.cc |
=================================================================== |
--- src/heap.cc (revision 8404) |
+++ src/heap.cc (working copy) |
@@ -2643,8 +2643,9 @@ |
int end, |
PretenureFlag pretenure) { |
int length = end - start; |
- |
- if (length == 1) { |
+ if (length == 0) { |
+ return empty_string(); |
+ } else if (length == 1) { |
return LookupSingleCharacterStringFromCode(buffer->Get(start)); |
} else if (length == 2) { |
// Optimization for 2-byte strings often used as keys in a decompression |