aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2004-06-30 23:30:39 +0000
committerKenichi Handa2004-06-30 23:30:39 +0000
commit4121d6122b9f3919bf1cc6433198ca9b14b4d67e (patch)
tree18fecf6d0060a3b204569641c82de9236b7127ee /src
parent07a6ab76c04dc9344ae1114c4acb7da5903825a0 (diff)
downloademacs-4121d6122b9f3919bf1cc6433198ca9b14b4d67e.tar.gz
emacs-4121d6122b9f3919bf1cc6433198ca9b14b4d67e.zip
(Fw32_set_clipboard_data): Update `nbytes' correctly
after getting a new string by pre-write-conversion.
Diffstat (limited to 'src')
-rw-r--r--src/w32select.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/w32select.c b/src/w32select.c
index 0c8849c7be6..20f7cfc457f 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -130,6 +130,8 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
130 130
131 BLOCK_INPUT; 131 BLOCK_INPUT;
132 132
133 /* Include the terminating NULL character in the source of
134 conversion. */
133 nbytes = SBYTES (string) + 1; 135 nbytes = SBYTES (string) + 1;
134 src = SDATA (string); 136 src = SDATA (string);
135 dst = src; 137 dst = src;
@@ -208,7 +210,9 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
208 { 210 {
209 string = run_pre_post_conversion_on_str (string, &coding, 1); 211 string = run_pre_post_conversion_on_str (string, &coding, 1);
210 src = SDATA (string); 212 src = SDATA (string);
211 nbytes = SBYTES (string); 213 /* Include the terminating NULL character in the source of
214 conversion. */
215 nbytes = SBYTES (string) + 1;
212 } 216 }
213 coding.src_multibyte = 1; 217 coding.src_multibyte = 1;
214 coding.dst_multibyte = 0; 218 coding.dst_multibyte = 0;