Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index d83e40d5d8664cf8b84c0b10c3e5e3b59e459d17..ab6711aaf436ab6ad1d8c44eb91b6104dac8cbdb 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -16927,7 +16927,7 @@ bool String::ParseDouble(const String& str, |
ASSERT(0 <= start); |
ASSERT(start <= end); |
ASSERT(end <= str.Length()); |
- int length = end - start; |
+ intptr_t length = end - start; |
NoGCScope no_gc; |
const uint8_t* startChar; |
if (str.IsOneByteString()) { |
@@ -16936,8 +16936,9 @@ bool String::ParseDouble(const String& str, |
startChar = ExternalOneByteString::CharAddr(str, start); |
} else { |
uint8_t* chars = Isolate::Current()->current_zone()->Alloc<uint8_t>(length); |
- for (int i = 0; i < length; i++) { |
- int ch = str.CharAt(start + i); |
+ const Scanner::CharAtFunc char_at = str.CharAtFunc(); |
+ for (intptr_t i = 0; i < length; i++) { |
+ int32_t ch = char_at(str, start + i); |
if (ch < 128) { |
chars[i] = ch; |
} else { |