diff options
Diffstat (limited to 'vendor/github.com/Philipp15b/go-steam/protocol/internal.go')
-rw-r--r-- | vendor/github.com/Philipp15b/go-steam/protocol/internal.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/Philipp15b/go-steam/protocol/internal.go b/vendor/github.com/Philipp15b/go-steam/protocol/internal.go index d9376384..197e384e 100644 --- a/vendor/github.com/Philipp15b/go-steam/protocol/internal.go +++ b/vendor/github.com/Philipp15b/go-steam/protocol/internal.go @@ -1,6 +1,7 @@ package protocol import ( + "encoding/hex" "io" "math" "strconv" @@ -42,6 +43,7 @@ const EClientPersonaStateFlag_DefaultInfoRequest = EClientPersonaStateFlag_Playe const DefaultAvatar = "fef49e7fa7e1997310d705b2a6158ff8dc1cdfeb" -func ValidAvatar(avatar string) bool { - return !(avatar == "0000000000000000000000000000000000000000" || len(avatar) != 40) +func ValidAvatar(avatar []byte) bool { + str := hex.EncodeToString(avatar) + return !(str == "0000000000000000000000000000000000000000" || len(str) != 40) } |