1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-26 10:49:33 +00:00

(Fw32_set_clipboard_data): Update `nbytes' correctly

after getting a new string by pre-write-conversion.
This commit is contained in:
Kenichi Handa 2004-06-30 23:30:39 +00:00
parent 07a6ab76c0
commit 4121d6122b

View File

@ -130,6 +130,8 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
BLOCK_INPUT;
/* Include the terminating NULL character in the source of
conversion. */
nbytes = SBYTES (string) + 1;
src = SDATA (string);
dst = src;
@ -208,7 +210,9 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
{
string = run_pre_post_conversion_on_str (string, &coding, 1);
src = SDATA (string);
nbytes = SBYTES (string);
/* Include the terminating NULL character in the source of
conversion. */
nbytes = SBYTES (string) + 1;
}
coding.src_multibyte = 1;
coding.dst_multibyte = 0;