From 7672d73ac72ebf93bccf3c25a4999822f02864dc Mon Sep 17 00:00:00 2001 From: int3l Date: Sat, 11 Apr 2020 18:57:59 +0300 Subject: [PATCH] Fix unhandled exception for invalid numeric SteamIDs Too big integers or numeric strings raise TypeError in make_steam64 instead of returning valid SteamID object with the invalid flag set. Examples: SteamID(111111111111111111111111111111111111111) SteamID('11111111111111111111111111111111111111') --- steam/steamid.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/steam/steamid.py b/steam/steamid.py index 42df5a5..fc08d64 100644 --- a/steam/steamid.py +++ b/steam/steamid.py @@ -253,6 +253,9 @@ def make_steam64(id=0, *args, **kwargs): # 64 bit elif value < 2**64: return value + # invalid account id + else: + accountid = 0 # textual input e.g. [g:1:4] else: