Index: sdk/lib/io/bytes_builder.dart |
diff --git a/sdk/lib/io/bytes_builder.dart b/sdk/lib/io/bytes_builder.dart |
index a239db87b7cd324b6df666ed06a0a70e5bd59e2c..dd2a6e79e95f163cc41a0e27aca2daa4a27d65d4 100644 |
--- a/sdk/lib/io/bytes_builder.dart |
+++ b/sdk/lib/io/bytes_builder.dart |
@@ -66,8 +66,9 @@ class BytesBuilder { |
List<int> takeBytes() { |
if (_buffer == null) return new Uint8List(0); |
var buffer = _buffer; |
+ int length = _length; |
clear(); |
- return new Uint8List.view(buffer.buffer, 0, _length); |
+ return new Uint8List.view(buffer.buffer, 0, length); |
Bill Hesse
2013/07/12 10:23:25
Very funny bug!
|
} |
/** |