mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix auto-generated code didn't actually write int128/int256
This commit is contained in:
parent
fb0898b9cb
commit
748c2560de
|
@ -484,10 +484,10 @@ class TLGenerator:
|
|||
builder.write("struct.pack('<q', {})".format(name))
|
||||
|
||||
elif 'int128' == arg.type:
|
||||
builder.write("int.to_bytes({}, 16, 'little', signed=True)")
|
||||
builder.write("{}.to_bytes(16, 'little', signed=True)".format(name))
|
||||
|
||||
elif 'int256' == arg.type:
|
||||
builder.write("int.to_bytes({}, 32, 'little', signed=True)")
|
||||
builder.write("{}.to_bytes(32, 'little', signed=True)".format(name))
|
||||
|
||||
elif 'double' == arg.type:
|
||||
builder.write("struct.pack('<d', {})".format(name))
|
||||
|
|
Loading…
Reference in New Issue
Block a user