From 7046314203cc68b4ece6de066ce86544590cdb5e Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Sat, 10 Apr 2004 09:04:05 +0000 Subject: Resync to 2004-04-10 XORG-RELEASE-1 branch --- src/FSlibInt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FSlibInt.c b/src/FSlibInt.c index 70167bd..fc17e4f 100644 --- a/src/FSlibInt.c +++ b/src/FSlibInt.c @@ -498,9 +498,10 @@ _FSReadPad(svr, data, size) if (bytes_read > 0) { size -= bytes_read; if (iov[0].iov_len < bytes_read) { - iov[1].iov_len += iov[0].iov_len - bytes_read; + int pad_bytes_read = bytes_read - iov[0].iov_len; + iov[1].iov_len -= pad_bytes_read; iov[1].iov_base = - (char *)iov[1].iov_base +bytes_read - iov[0].iov_len; + (char *)iov[1].iov_base + pad_bytes_read; iov[0].iov_len = 0; } else { iov[0].iov_len -= bytes_read; -- cgit v1.2.3