diff options
author | Thomas Klausner <wiz@NetBSD.org> | 2013-06-25 18:31:32 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:27 +0200 |
commit | d122d75454c9e9dbd0f2c51c259387e9182d70ec (patch) | |
tree | 9c8c63fb8b63064ebdca15430d0f055c3c37c938 | |
parent | 88edf80838c182ec5a533e2ffec429747b128355 (diff) | |
download | nx-libs-d122d75454c9e9dbd0f2c51c259387e9182d70ec.tar.gz nx-libs-d122d75454c9e9dbd0f2c51c259387e9182d70ec.tar.bz2 nx-libs-d122d75454c9e9dbd0f2c51c259387e9182d70ec.zip |
Stop truncating source to destination length if it is larger.
It seems useless to do that since the code tests for both source
length and destination to be non-zero. This fixes a cut'n'paste
problem in xterm where the paste length was limited to 1024 (BUFSIZ)
in button.c.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
-rw-r--r-- | nx-X11/lib/X11/lcGenConv.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/nx-X11/lib/X11/lcGenConv.c b/nx-X11/lib/X11/lcGenConv.c index 42d63c529..1041dc709 100644 --- a/nx-X11/lib/X11/lcGenConv.c +++ b/nx-X11/lib/X11/lcGenConv.c @@ -764,9 +764,6 @@ mbstowcs_org( return( 0 ); } - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { ch = *inbufptr++; @@ -921,9 +918,6 @@ wcstombs_org( int defstr_len = strlen(default_string); - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { wc = *inbufptr++; @@ -1080,9 +1074,6 @@ wcstocts( int from_size = *from_left; char *ext_seg_len = NULL; - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { wc = *inbufptr++; @@ -1272,9 +1263,6 @@ ctstowcs( return( 0 ); } - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { ch = *inbufptr++; @@ -1666,9 +1654,6 @@ mbstostr( return( 0 ); } - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { ch = *inbufptr++; @@ -1956,10 +1941,6 @@ wcstostr( const char *default_string = XLC_PUBLIC(lcd, default_string); int defstr_len = strlen(default_string); - - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { wc = *inbufptr++; @@ -2114,9 +2095,6 @@ wctocs( char *outbufptr = *to; int from_size = *from_left; - if (*from_left > *to_left) - *from_left = *to_left; - if (*from_left && *to_left) { wc = *inbufptr++; @@ -2427,9 +2405,6 @@ strtombs( char *outbufptr = *to; int from_size = *from_left; - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { ch = *inbufptr++; @@ -2537,9 +2512,6 @@ strtowcs( wchar_t *outbufptr = (wchar_t *)*to; int from_size = *from_left; - if (*from_left > *to_left) - *from_left = *to_left; - while (*from_left && *to_left) { ch = *inbufptr++; |