update to new go-steam version
This commit is contained in:
@@ -2,6 +2,7 @@ package csgo
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"regexp"
|
||||
@@ -29,10 +30,10 @@ func DecodeSharecode(code string) (matchID, outcomeID uint64, tokenID uint16, er
|
||||
bigInt.Add(bigInt, big.NewInt(int64(strings.Index(Base57Chars, c))))
|
||||
}
|
||||
|
||||
if bigInt.BitLen() > 144 { //nolint:gomnd
|
||||
return 0, 0, 0, fmt.Errorf("invalid sharecode")
|
||||
if bigInt.BitLen() > 144 {
|
||||
return 0, 0, 0, errors.New("invalid sharecode")
|
||||
}
|
||||
bytes := make([]byte, 18) //nolint:gomnd
|
||||
bytes := make([]byte, 18)
|
||||
bigInt.FillBytes(bytes)
|
||||
|
||||
matchID = binary.LittleEndian.Uint64(bytes[0:8])
|
||||
|
||||
Reference in New Issue
Block a user