From bfd536431bcef928b2ceb3d58ff8044b2718b375 Mon Sep 17 00:00:00 2001 From: Vysheng Date: Thu, 21 Nov 2013 23:54:06 +0400 Subject: [PATCH] Fixed bugs. Probably now something works --- binlog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/binlog.c b/binlog.c index ef46b8b..ffe00bc 100644 --- a/binlog.c +++ b/binlog.c @@ -465,9 +465,9 @@ void replay_log_event (void) { if (!U->nonce) { U->nonce = malloc (256); } - memcpy (rptr, U->g_key, 256); + memcpy (U->g_key, rptr, 256); rptr += 64; - memcpy (rptr, U->nonce, 256); + memcpy (U->nonce, rptr, 256); rptr += 64; U->key_fingerprint = *(long long *)rptr; rptr += 2; @@ -835,7 +835,6 @@ void bl_do_encr_chat_requested (struct secret_chat *U, long long access_hash, in ev[4] = date; ev[5] = admin_id; ev[6] = user_id; - logprintf ("user_id = %d, admin_id = %d, our_id = %d\n", user_id, admin_id, our_id); memcpy (ev + 7, g_key, 256); memcpy (ev + 7 + 64, nonce, 256); add_log_event (ev, 540);