Mercurial > emacs
diff src/xselect.c @ 21330:146e9f0c310b
(selection_data_to_lisp_data): Give
make_string_from_bytes a correct char size.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 02 Apr 1998 00:25:47 +0000 |
parents | d9bd70c35dba |
children | fa9ff387d260 |
line wrap: on
line diff
--- a/src/xselect.c Wed Apr 01 12:26:43 1998 +0000 +++ b/src/xselect.c Thu Apr 02 00:25:47 1998 +0000 @@ -1506,8 +1506,10 @@ 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;