From 3408cb629bbe9876e50a36528e85405c9befddda Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Wed, 3 Mar 2004 21:49:58 +0000 Subject: [PATCH] bug #265 sync with fd.o xlibs version of the fix XFree86 made to their XlibInt.c, 3.37 (4.3.99.5) --- src/XlibInt.c | 4 ++-- 1 file 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 {