mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-126992: Change pickle code to base 10 for load_long and load_int (GH-127042)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
d5d84c3f13
commit
ce76b547f9
5 changed files with 64 additions and 9 deletions
|
|
@ -1387,7 +1387,7 @@ class _Unpickler:
|
|||
elif data == TRUE[1:]:
|
||||
val = True
|
||||
else:
|
||||
val = int(data, 0)
|
||||
val = int(data)
|
||||
self.append(val)
|
||||
dispatch[INT[0]] = load_int
|
||||
|
||||
|
|
@ -1407,7 +1407,7 @@ class _Unpickler:
|
|||
val = self.readline()[:-1]
|
||||
if val and val[-1] == b'L'[0]:
|
||||
val = val[:-1]
|
||||
self.append(int(val, 0))
|
||||
self.append(int(val))
|
||||
dispatch[LONG[0]] = load_long
|
||||
|
||||
def load_long1(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue