Commit 1bd70c6e authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(lisp_data_to_selection_data): If OBJ is a non-ASCII

multibyte string, signal an error instead of aborting.
parent d31fa104
......@@ -1908,7 +1908,12 @@ lisp_data_to_selection_data (display, obj,
else if (STRINGP (obj))
xassert (! STRING_MULTIBYTE (obj));
if (SCHARS (obj) < SBYTES (obj))
/* OBJ is a multibyte string containing a non-ASCII char. */
Fsignal (Qerror, /* Qselection_error */
Fcons (build_string
("Non-ASCII string must be encoded in advance"),
Fcons (obj, Qnil)));
if (NILP (type))
type = QSTRING;
*format_ret = 8;
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