From 195bba6f2193c55ad5142563532dcbe3bb14077d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Fri, 29 Sep 2017 12:57:53 +0200 Subject: [PATCH] Fix bug where booleans were always serialized as false --- telethon_generator/tl_generator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telethon_generator/tl_generator.py b/telethon_generator/tl_generator.py index c6f56bbb..861261e6 100644 --- a/telethon_generator/tl_generator.py +++ b/telethon_generator/tl_generator.py @@ -496,7 +496,9 @@ class TLGenerator: elif 'Bool' == arg.type: # 0x997275b5 if boolean else 0xbc799737 - builder.write(r"b'\xb5ur\x99' if {} else b'7\x97y\xbc'") + builder.write( + r"b'\xb5ur\x99' if {} else b'7\x97y\xbc'".format(name) + ) elif 'true' == arg.type: pass # These are actually NOT written! Only used for flags