diff --git a/src/strtod.cc b/src/strtod.cc index a309e7b6d1..76e2bc4a06 100644 --- a/src/strtod.cc +++ b/src/strtod.cc @@ -125,20 +125,20 @@ static double old_strtod(Vector buffer, int exponent) { static Vector TrimLeadingZeros(Vector buffer) { for (int i = 0; i < buffer.length(); i++) { if (buffer[i] != '0') { - return Vector(buffer.start() + i, buffer.length() - i); + return buffer.SubVector(i, buffer.length()); } } - return Vector(buffer.start(), 0); + return buffer.SubVector(0, 0); } static Vector TrimTrailingZeros(Vector buffer) { for (int i = buffer.length() - 1; i >= 0; --i) { if (buffer[i] != '0') { - return Vector(buffer.start(), i + 1); + return buffer.SubVector(0, i + 1); } } - return Vector(buffer.start(), 0); + return buffer.SubVector(0, 0); }