From: Kenichi Handa Date: Thu, 2 Apr 1998 00:25:47 +0000 (+0000) Subject: (selection_data_to_lisp_data): Give X-Git-Tag: emacs-20.3~1744 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=25b98b34c55aff2590e5a8926c756e17818b840a;p=emacs.git (selection_data_to_lisp_data): Give make_string_from_bytes a correct char size. --- 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;