mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-05 22:45:38 +00:00
fix (uint) unboxing on fields "int flags"
This commit is contained in:
parent
272a89f562
commit
bedb44582e
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ namespace TL
|
|||
if (((ifFlag = field.GetCustomAttribute<IfFlagAttribute>()) != null) && (flags & (1U << ifFlag.Bit)) == 0) continue;
|
||||
object value = field.GetValue(obj);
|
||||
writer.WriteTLValue(value, field.FieldType);
|
||||
if (field.Name == "flags") flags = (uint)value;
|
||||
if (field.Name == "flags" && field.FieldType.IsEnum) flags = (uint)value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ namespace TL
|
|||
if (((ifFlag = field.GetCustomAttribute<IfFlagAttribute>()) != null) && (flags & (1U << ifFlag.Bit)) == 0) continue;
|
||||
object value = reader.ReadTLValue(field.FieldType);
|
||||
field.SetValue(obj, value);
|
||||
if (field.Name == "flags") flags = (uint)value;
|
||||
if (field.Name == "flags" && field.FieldType.IsEnum) flags = (uint)value;
|
||||
else if (field.Name == "access_hash") reader.Client?.UpdateAccessHash(obj, type, value);
|
||||
}
|
||||
return (IObject)obj;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue