Wrap receive tail pointer correctly.

This commit is contained in:
Kristian Høgsberg 2007-04-12 14:11:20 -04:00
parent 194edcc9cd
commit fb1570efbf
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}