From cd424a7bc5e08bb3a9ae1266e744ee08c57dbbf9 Mon Sep 17 00:00:00 2001 From: JamesNK Date: Thu, 19 Jan 2012 08:30:00 +0000 Subject: [PATCH] -Fixed BsonReader to use BinaryReader instead of base stream --- Src/Newtonsoft.Json/Bson/BsonReader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Newtonsoft.Json/Bson/BsonReader.cs b/Src/Newtonsoft.Json/Bson/BsonReader.cs index 092d6ca8..a36bb92d 100644 --- a/Src/Newtonsoft.Json/Bson/BsonReader.cs +++ b/Src/Newtonsoft.Json/Bson/BsonReader.cs @@ -721,7 +721,7 @@ namespace Newtonsoft.Json.Bson ? MaxCharBytesSize - offset : length - totalBytesRead; - int byteCount = _reader.BaseStream.Read(_byteBuffer, offset, count); + int byteCount = _reader.Read(_byteBuffer, offset, count); if (byteCount == 0) throw new EndOfStreamException("Unable to read beyond the end of the stream.");