diff options
author | Evgeny Kurnevsky <kurnevsky@gmail.com> | 2018-06-25 10:00:40 +0300 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-06-29 23:02:01 +0000 |
commit | 52f21e32518244f3008efbef073f9d3ac9e68b43 (patch) | |
tree | 381ef54563b5e0475d8c3d1810d7ecf678f69e74 /toxcore/net_crypto.c | |
parent | b9a75d98b2c0107684bfb5a127eabba5bbb3b2b3 (diff) |
Correct check for net_crypto packet index.
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 6a8932d1..5eea7a50 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -727,7 +727,7 @@ static uint32_t num_packets_array(const Packets_Array *array) | |||
727 | */ | 727 | */ |
728 | static int add_data_to_buffer(const Logger *log, Packets_Array *array, uint32_t number, const Packet_Data *data) | 728 | static int add_data_to_buffer(const Logger *log, Packets_Array *array, uint32_t number, const Packet_Data *data) |
729 | { | 729 | { |
730 | if (number - array->buffer_start > CRYPTO_PACKET_BUFFER_SIZE) { | 730 | if (number - array->buffer_start >= CRYPTO_PACKET_BUFFER_SIZE) { |
731 | return -1; | 731 | return -1; |
732 | } | 732 | } |
733 | 733 | ||