line_buffer_read() did not properly remove the bytes read, it just bumped

the read offset.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9152 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-10-01 17:29:10 +00:00
parent 87df3fdab8
commit 9d1f6da844

View File

@ -82,8 +82,10 @@ line_buffer_user_read(struct line_buffer &buffer, char *data, size_t length)
bytesRead = B_BAD_ADDRESS;
}
if (bytesRead > 0)
if (bytesRead > 0) {
buffer.first = (buffer.first + bytesRead) % buffer.size;
buffer.in -= bytesRead;
}
return bytesRead;
}