mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Correct check for net_crypto packet index.
This commit is contained in:
parent
b9a75d98b2
commit
52f21e3251
|
@ -727,7 +727,7 @@ static uint32_t num_packets_array(const Packets_Array *array)
|
|||
*/
|
||||
static int add_data_to_buffer(const Logger *log, Packets_Array *array, uint32_t number, const Packet_Data *data)
|
||||
{
|
||||
if (number - array->buffer_start > CRYPTO_PACKET_BUFFER_SIZE) {
|
||||
if (number - array->buffer_start >= CRYPTO_PACKET_BUFFER_SIZE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user