Browse Source

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')
pull/248/head
int3l 5 years ago
committed by GitHub
parent
commit
7672d73ac7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      steam/steamid.py

3
steam/steamid.py

@ -253,6 +253,9 @@ def make_steam64(id=0, *args, **kwargs):
# 64 bit # 64 bit
elif value < 2**64: elif value < 2**64:
return value return value
# invalid account id
else:
accountid = 0
# textual input e.g. [g:1:4] # textual input e.g. [g:1:4]
else: else:

Loading…
Cancel
Save