From 10ca6ccd4637495fd8a533b7f67176f64cf4b480 Mon Sep 17 00:00:00 2001 From: vvaltman Date: Sat, 22 Nov 2014 17:32:10 +0300 Subject: [PATCH] telegram-base: fixed bug in read_state --- telegram-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram-base.c b/telegram-base.c index 5311eaa..c562d98 100644 --- a/telegram-base.c +++ b/telegram-base.c @@ -56,7 +56,7 @@ void read_state_file (struct tgl_state *TLS) { int version, magic; if (read (state_file_fd, &magic, 4) < 4) { close (state_file_fd); return; } if (magic != (int)STATE_FILE_MAGIC) { close (state_file_fd); return; } - if (read (state_file_fd, &version, 4 || version < 0) < 4) { close (state_file_fd); return; } + if (read (state_file_fd, &version, 4) < 4 || version < 0) { close (state_file_fd); return; } int x[4]; if (read (state_file_fd, x, 16) < 16) { close (state_file_fd);