Skip to content

Commit f62a9de

Browse files
Update (*valueReader).peekLength() to support bVR + streaming
1 parent 0036af6 commit f62a9de

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bson/value_reader.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,11 +927,10 @@ func (vr *valueReader) readString() (string, error) {
927927
}
928928

929929
func (vr *valueReader) peekLength() (int32, error) {
930-
buf, err := vr.r.Peek(4)
930+
buf, err := vr.src.peek(4)
931931
if err != nil {
932932
return 0, err
933933
}
934-
935934
return int32(binary.LittleEndian.Uint32(buf)), nil
936935
}
937936

0 commit comments

Comments
 (0)