diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-03-29 12:18:05 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-03-29 12:18:05 +0000 |
commit | 826619f67bebe1495af51cff1704558d3119435a (patch) | |
tree | df4fa8402c99674beb8f444b8496da75b3194303 | |
parent | e9582134862ee8ba07d6c9ced4d233a252b5df39 (diff) |
merge with XORG-RELEASE-1CYGWIN-PRE-6_8_0-MERGECYGWIN-HEAD-MERGECYGWIN-HEAD-LAST-MERGE
-rw-r--r-- | src/FSlibInt.c | 5 |
1 files 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; |