Index: src/string-stream.cc |
diff --git a/src/string-stream.cc b/src/string-stream.cc |
index fc07d94ded237ee4ca79ebde48fe036680de6910..30519b561046a4012db3260dc96c93f8f2e32953 100644 |
--- a/src/string-stream.cc |
+++ b/src/string-stream.cc |
@@ -311,14 +311,14 @@ bool StringStream::Put(String* str) { |
bool StringStream::Put(String* str, int start, int end) { |
- ConsStringIteratorOp op; |
- StringCharacterStream stream(str, &op, start); |
- for (int i = start; i < end && stream.HasMore(); i++) { |
- uint16_t c = stream.GetNext(); |
+ StringInputBuffer name_buffer(str); |
+ name_buffer.Seek(start); |
+ for (int i = start; i < end && name_buffer.has_more(); i++) { |
+ int c = name_buffer.GetNext(); |
if (c >= 127 || c < 32) { |
c = '?'; |
} |
- if (!Put(static_cast<char>(c))) { |
+ if (!Put(c)) { |
return false; // Output was truncated. |
} |
} |