From 3727b3e6643c8a7a6324d8cd4b5dce24f424021d Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Fri, 6 Sep 2024 13:24:10 +1000 Subject: [PATCH] Fixed unecessary int64 to int conversion --- pkg/yqlib/decoder_base64.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/yqlib/decoder_base64.go b/pkg/yqlib/decoder_base64.go index 50ed3507..b5e9681e 100644 --- a/pkg/yqlib/decoder_base64.go +++ b/pkg/yqlib/decoder_base64.go @@ -8,20 +8,20 @@ import ( ) type base64Padder struct { - count uint64 + count int io.Reader } func (c *base64Padder) pad(buf []byte) (int, error) { - pad := strings.Repeat("=", int(4-c.count%4)) + pad := strings.Repeat("=", (4 - c.count%4)) n, err := strings.NewReader(pad).Read(buf) - c.count += uint64(n) + c.count += n return n, err } func (c *base64Padder) Read(buf []byte) (int, error) { n, err := c.Reader.Read(buf) - c.count += uint64(n) + c.count += n if err == io.EOF && c.count%4 != 0 { return c.pad(buf)