diff options
author | Kenichi Handa <handa@m17n.org> | 1998-04-02 00:25:47 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1998-04-02 00:25:47 +0000 |
commit | 736724c00cc679d6ae07e3d98b0e1695595f089d (patch) | |
tree | 0f960fe7735462d3fd037cef54d6cac37a74fb5c /src/xselect.c | |
parent | 7e3aefc85c6b9606934fea092f75c107b16cb248 (diff) | |
download | emacs-736724c00cc679d6ae07e3d98b0e1695595f089d.tar.gz |
(selection_data_to_lisp_data): Give
make_string_from_bytes a correct char size.
Diffstat (limited to 'src/xselect.c')
-rw-r--r-- | src/xselect.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xselect.c b/src/xselect.c index 5eb7d432158..0a6978ec5c2 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1506,8 +1506,10 @@ selection_data_to_lisp_data (display, data, size, type, format) bufsize = decoding_buffer_size (&coding, size); buf = (unsigned char *) xmalloc (bufsize); decode_coding (&coding, data, buf, size, bufsize); - str = make_string_from_bytes ((char *) buf, - coding.produced_char, coding.produced); + size = (coding.fake_multibyte + ? multibyte_chars_in_text (buf, coding.produced) + : coding.produced_char); + str = make_string_from_bytes ((char *) buf, size, coding.produced); xfree (buf); } return str; |