From fb1570efbf4cb8ff4ef45937408cee43874c863a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 12 Apr 2007 14:11:20 -0400 Subject: [PATCH] Wrap receive tail pointer correctly. --- juju/raw1394-iso.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/juju/raw1394-iso.c b/juju/raw1394-iso.c index 732727f..06ece9a 100644 --- a/juju/raw1394-iso.c +++ b/juju/raw1394-iso.c @@ -176,7 +176,8 @@ flush_recv_packets(raw1394handle_t handle, handle->iso.tail += handle->iso.max_packet_size; handle->iso.packet_count--; - if (handle->iso.tail == handle->iso.buffer_end) + + if (handle->iso.tail + handle->iso.max_packet_size > handle->iso.buffer_end) handle->iso.tail = handle->iso.buffer; }