Mercurial > emacs
changeset 24251:2394581ada26
(set_clipboard_data): Correctly null-terminate the
string to be put into the Windows clipboard. Use xbuf_addr.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 02 Feb 1999 13:43:14 +0000 |
parents | 98056b9021a6 |
children | e0ae6525db58 |
files | src/w16select.c |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w16select.c Tue Feb 02 05:11:50 1999 +0000 +++ b/src/w16select.c Tue Feb 02 13:43:14 1999 +0000 @@ -263,7 +263,13 @@ /* Move the buffer into the low memory, convert LF into CR-LF if needed. */ if (Raw) - dosmemput (Data, truelen, __tb); + { + dosmemput (Data, Size, xbuf_addr); + + /* Terminate with a null, otherwise Windows does strange things + when the text size is an integral multiple of 32 bytes. */ + _farpokeb (_dos_ds, xbuf_addr + Size, '\0'); + } else { dp = Data; @@ -279,12 +285,12 @@ _farnspokeb (buf_offset++, '\r'); _farnspokeb (buf_offset++, *dp++); } + + /* Terminate with a null, otherwise Windows does strange things + when the text size is an integral multiple of 32 bytes. */ + _farnspokeb (buf_offset, '\0'); } - /* Terminate with a null, otherwise Windows does strange things when - the text size is an integral multiple of 32 bytes. */ - _farnspokeb (buf_offset, *dp); - /* Calls Int 2Fh/AX=1703h with: DX = WinOldAp-Supported Clipboard format ES:BX = Pointer to data