mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-17 10:06:13 +00:00
(lisp_data_to_selection_data): If OBJ is a non-ASCII
multibyte string, signal an error instead of aborting.
This commit is contained in:
parent
d31fa104a1
commit
1bd70c6e1d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user