# HG changeset patch # User Eli Zaretskii # Date 918053627 0 # Node ID 7507c0552393d5279190307c75980d9475f02747 # Parent 47e6aa168a66fd1275d643a7a85eb1a739df3c5b (Fw16_set_clipboard_data): When the text needs to be encoded, set its pointer and size as returned by encode_coding. diff -r 47e6aa168a66 -r 7507c0552393 src/w16select.c --- a/src/w16select.c Wed Feb 03 06:26:56 1999 +0000 +++ b/src/w16select.c Wed Feb 03 14:53:47 1999 +0000 @@ -475,6 +475,7 @@ /* No multibyte character in OBJ. We need not encode it, but we will have to convert it to DOS CR-LF style. */ no_crlf_conversion = 0; + dst = src; } else { @@ -495,6 +496,7 @@ dst = (unsigned char *) xmalloc (bufsize); encode_coding (&coding, src, dst, nbytes, bufsize); no_crlf_conversion = 1; + nbytes = coding.produced; } if (!open_clipboard ()) @@ -502,7 +504,7 @@ ok = empty_clipboard () && ((put_status - = set_clipboard_data (CF_OEMTEXT, src, nbytes, no_crlf_conversion)) + = set_clipboard_data (CF_OEMTEXT, dst, nbytes, no_crlf_conversion)) == 0); if (!no_crlf_conversion)