Mercurial > emacs
changeset 56299:1a3e49df7b8d
(Fw32_set_clipboard_data): Update `nbytes' correctly
after getting a new string by pre-write-conversion.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 30 Jun 2004 23:30:39 +0000 |
parents | 31fffb8693e4 |
children | 8cf62c3870a3 |
files | src/w32select.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32select.c Wed Jun 30 19:36:36 2004 +0000 +++ b/src/w32select.c Wed Jun 30 23:30:39 2004 +0000 @@ -130,6 +130,8 @@ 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 @@ { 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;