From f0ea40e2718cbfec33cbe370c37c6d812c18d178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 2 May 2024 00:48:43 +0900 Subject: [PATCH] fix: adapt to 1.20 --- img/pool/nt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/img/pool/nt.go b/img/pool/nt.go index f9a904b..ae96cfd 100644 --- a/img/pool/nt.go +++ b/img/pool/nt.go @@ -55,12 +55,12 @@ func (nu nturl) pack() (string, error) { var buf [ntrawlen]byte fileid := subs[1] rkey := subs[2] - _, err := base64.RawURLEncoding.AppendDecode(buf[:0], binary.StringToBytes(fileid)) + _, err := base64.RawURLEncoding.Decode(buf[:ntappidlen], binary.StringToBytes(fileid)) if err != nil { return "", err } buf[ntappidlen-1] = byte(len(fileid)) - _, err = base64.RawURLEncoding.AppendDecode(buf[60:60], binary.StringToBytes(rkey)) + _, err = base64.RawURLEncoding.Decode(buf[ntappidlen:], binary.StringToBytes(rkey)) if err != nil { return "", err }