Commit 25b98b34 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(selection_data_to_lisp_data): Give

make_string_from_bytes a correct char size.
parent 751fa747
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment