From 22eacbd378a2445a7fa8262dfa626d41702bf097 Mon Sep 17 00:00:00 2001 From: Brian Shih Date: Sun, 21 Apr 2024 19:42:48 -0400 Subject: [PATCH] readint and readlong eof --- reader.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reader.go b/reader.go index 698a684..72a7bc1 100644 --- a/reader.go +++ b/reader.go @@ -174,6 +174,7 @@ func (r *Reader) ReadInt() int32 { // We ran out of buffer and are not at the end of the int, // Read more into the buffer. if !r.loadMore() { + r.Error = fmt.Errorf("reading int %w", r.Error) return 0 } } @@ -216,6 +217,7 @@ func (r *Reader) ReadLong() int64 { // We ran out of buffer and are not at the end of the long, // Read more into the buffer. if !r.loadMore() { + r.Error = fmt.Errorf("reading long %w", r.Error) return 0 } }