Skip to content

Commit

Permalink
fix: adapt to 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed May 1, 2024
1 parent f8fffb7 commit f0ea40e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions img/pool/nt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f0ea40e

Please sign in to comment.