From 56ab6777900010b8d70bbafeab1ce18f44a72909 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 10 Feb 2019 08:56:45 -0800 Subject: [PATCH] cleanup --- formats/dcc/dcc.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/formats/dcc/dcc.go b/formats/dcc/dcc.go index 80ae192..cd63b95 100644 --- a/formats/dcc/dcc.go +++ b/formats/dcc/dcc.go @@ -121,7 +121,14 @@ func readDirection(reader io.ReadSeeker, fileHead fileHeader) error { bitReader := streaming.NewBitReader(reader) dirHead := readDirectionHeader(bitReader) + if err := bitReader.Error(); err != nil { + return err + } + frameHead := readFrameHeader(bitReader, *dirHead) + if err := bitReader.Error(); err != nil { + return err + } fmt.Printf("%+v\n", dirHead) fmt.Printf("%+v\n", frameHead)