summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2004-03-03 21:49:58 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2004-03-03 21:49:58 +0000
commit3408cb629bbe9876e50a36528e85405c9befddda (patch)
tree30095b6a3bede80f098e490f9859c1db3e75c75c
parent1f42e6ce18e72eabf5fe02a3a693fca58267dfd3 (diff)
downloadxorg-lib-libX11-3408cb629bbe9876e50a36528e85405c9befddda.tar.gz
bug #265 sync with fd.o xlibs version of the fix XFree86 made to their XlibInt.c, 3.37 (4.3.99.5)
-rw-r--r--src/XlibInt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/XlibInt.c b/src/XlibInt.c
index 6bb2d181..ca9e5f0a 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -1281,9 +1281,9 @@ void _XReadPad(
if (bytes_read > 0) {
size -= bytes_read;
if (iov[0].iov_len < bytes_read) {
- iov[1].iov_len += iov[0].iov_len - bytes_read;
+ iov[1].iov_len -= (bytes_read - iov[0].iov_len);
iov[1].iov_base =
- (char *)iov[1].iov_base + bytes_read - iov[0].iov_len;
+ (char *)iov[1].iov_base + (bytes_read - iov[0].iov_len);
iov[0].iov_len = 0;
}
else {