From fdaddb539e8d2f25ccc8cc66d8c1e36cfee83e02 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 4 Jul 2017 02:50:24 +0200 Subject: irecv_send_buffer: Fix status check loop condition by incrementing retry count This state is hardly reached but nevertheless it doesn't make sense to check a retry count that never increases :) --- src/libirecovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libirecovery.c b/src/libirecovery.c index 9260adb..1b42fbd 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -1794,7 +1794,7 @@ IRECV_API irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* if (!recovery_mode && status != 5) { int retry = 0; - while (retry < 20) { + while (retry++ < 20) { irecv_get_status(client, &status); if (status == 5) { break; -- cgit v1.1-32-gdbae