aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-04-02 00:25:47 +0000
committerKenichi Handa1998-04-02 00:25:47 +0000
commit25b98b34c55aff2590e5a8926c756e17818b840a (patch)
tree1ab454359fa845a26f7ff98a3dd7500ea289ebbe /src
parent751fa74742ce39a9ab99764005d72a26247e9696 (diff)
downloademacs-25b98b34c55aff2590e5a8926c756e17818b840a.tar.gz
emacs-25b98b34c55aff2590e5a8926c756e17818b840a.zip
(selection_data_to_lisp_data): Give
make_string_from_bytes a correct char size.
Diffstat (limited to 'src')
-rw-r--r--src/xselect.c6
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)
1506 bufsize = decoding_buffer_size (&coding, size); 1506 bufsize = decoding_buffer_size (&coding, size);
1507 buf = (unsigned char *) xmalloc (bufsize); 1507 buf = (unsigned char *) xmalloc (bufsize);
1508 decode_coding (&coding, data, buf, size, bufsize); 1508 decode_coding (&coding, data, buf, size, bufsize);
1509 str = make_string_from_bytes ((char *) buf, 1509 size = (coding.fake_multibyte
1510 coding.produced_char, coding.produced); 1510 ? multibyte_chars_in_text (buf, coding.produced)
1511 : coding.produced_char);
1512 str = make_string_from_bytes ((char *) buf, size, coding.produced);
1511 xfree (buf); 1513 xfree (buf);
1512 } 1514 }
1513 return str; 1515 return str;