summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2004-03-04 02:46:34 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2004-03-04 02:46:34 +0000
commit261ec6cd2b1f4cafdd1e9f2307964d925f51f1a5 (patch)
tree661d1bbd9b970d9a52673e41140a38809ad18534
parent3408cb629bbe9876e50a36528e85405c9befddda (diff)
downloadxorg-lib-libX11-261ec6cd2b1f4cafdd1e9f2307964d925f51f1a5.tar.gz
bug #265 again
-rw-r--r--src/XlibInt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/XlibInt.c b/src/XlibInt.c
index ca9e5f0a..88240310 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -1281,9 +1281,10 @@ void _XReadPad(
if (bytes_read > 0) {
size -= bytes_read;
if (iov[0].iov_len < bytes_read) {
- iov[1].iov_len -= (bytes_read - iov[0].iov_len);
+ 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 {