From 47e3e47216bd3c093c3fc4081d385fcfaa2729bd Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Tue, 16 Nov 2021 07:49:44 +0100 Subject: [PATCH] Fix logic error in ModuloBufReader --- backend/media/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/media/service.go b/backend/media/service.go index b847724..a770afc 100644 --- a/backend/media/service.go +++ b/backend/media/service.go @@ -524,7 +524,7 @@ func (r *ModuloBufReader) Read(p []byte) (int, error) { rem := nr % r.modSize if rem != 0 { // err is always nil - _, _ = r.buf.Write(p[nr-rem:]) + _, _ = r.buf.Write(p[nr-rem : nr]) } return nr - rem, err