From e76d1f3bb566670441de86f267f82c60f0364b89 Mon Sep 17 00:00:00 2001 From: John Starich Date: Thu, 25 Jun 2020 23:27:17 -0500 Subject: [PATCH] Fix panic when not filling up zipfs's read buffer --- zipfs/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipfs/file.go b/zipfs/file.go index 57d72012..355f5f45 100644 --- a/zipfs/file.go +++ b/zipfs/file.go @@ -61,7 +61,7 @@ func (f *File) Read(p []byte) (n int, err error) { } err = f.fillBuffer(f.offset + int64(len(p))) n = copy(p, f.buf[f.offset:]) - f.offset += int64(len(p)) + f.offset += int64(n) return }