Index: sdk/lib/convert/base64.dart |
diff --git a/sdk/lib/convert/base64.dart b/sdk/lib/convert/base64.dart |
index 66c1f0ce951e281e9e022ed2d61b6cbdac2a2e48..77f7158008902eced9c39244400b72a4209e6166 100644 |
--- a/sdk/lib/convert/base64.dart |
+++ b/sdk/lib/convert/base64.dart |
@@ -307,12 +307,12 @@ class _Utf8Base64EncoderSink extends _Base64EncoderSink { |
class Base64Decoder extends Converter<String, List<int>> { |
const Base64Decoder(); |
- List<int> convert(String input, [int start = 0, int end]) { |
- end = RangeError.checkValidRange(start, end, input.length); |
- if (start == end) return new Uint8List(0); |
+ List<int> convert(String input) { |
+ if (input.isEmpty) return new Uint8List(0); |
+ int length = input.length; |
var decoder = new _Base64Decoder(); |
- Uint8List buffer = decoder.decode(input, start, end); |
- decoder.close(input, end); |
+ Uint8List buffer = decoder.decode(input, 0, input.length); |
+ decoder.close(input, input.length); |
return buffer; |
} |