Fixed merge structures.c
This commit is contained in:
parent
11ab0194eb
commit
3383755b21
1 changed files with 6 additions and 22 deletions
28
structures.c
28
structures.c
|
@ -1482,29 +1482,13 @@ void fetch_encrypted_message_file (struct message_media *M) {
|
|||
if (x == CODE_encrypted_file_empty) {
|
||||
assert (M->type != CODE_decrypted_message_media_photo && M->type != CODE_decrypted_message_media_video);
|
||||
} else {
|
||||
assert (M->type == CODE_decrypted_message_media_document || M->type == CODE_decrypted_message_media_photo || M->type == CODE_decrypted_message_media_video);
|
||||
assert (M->type == CODE_decrypted_message_media_document || M->type == CODE_decrypted_message_media_photo || M->type == CODE_decrypted_message_media_video || M->type == CODE_decrypted_message_media_audio);
|
||||
|
||||
switch (M->type) {
|
||||
case CODE_decrypted_message_media_document:
|
||||
// Not at all sure these entries are correct.
|
||||
// Especially since values are not fetched into structures rigidly for photo and video.
|
||||
M->encr_document.id = fetch_long();
|
||||
M->encr_document.access_hash = fetch_long();
|
||||
M->encr_document.dc_id = fetch_int();
|
||||
M->encr_document.size = fetch_int();
|
||||
M->encr_document.key_fingerprint = fetch_int();
|
||||
break;
|
||||
case CODE_decrypted_message_media_photo:
|
||||
case CODE_decrypted_message_media_video:
|
||||
M->encr_photo.id = fetch_long ();
|
||||
M->encr_photo.access_hash = fetch_long ();
|
||||
fetch_int ();
|
||||
//assert (M->encr_photo.size == fetch_int ());
|
||||
//M->encr_photo.size = fetch_int (); // Why it is not the same?
|
||||
M->encr_photo.dc_id = fetch_int ();
|
||||
M->encr_photo.key_fingerprint = fetch_int ();
|
||||
break;
|
||||
}
|
||||
M->encr_photo.id = fetch_long();
|
||||
M->encr_photo.access_hash = fetch_long();
|
||||
M->encr_photo.dc_id = fetch_int();
|
||||
M->encr_photo.size = fetch_int();
|
||||
M->encr_photo.key_fingerprint = fetch_int();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue