diff options
| author | Kenichi Handa <handa@m17n.org> | 2005-02-14 00:59:42 +0000 |
|---|---|---|
| committer | Kenichi Handa <handa@m17n.org> | 2005-02-14 00:59:42 +0000 |
| commit | 1bd70c6e1d8bf8c2a02d68efd0fe8b4fa9bef60d (patch) | |
| tree | 5602407e28a314dd0b77a9695e0d4dce3dc16ee5 /src | |
| parent | d31fa104a1009de730e74befec2b4512b729a0c9 (diff) | |
| download | emacs-1bd70c6e1d8bf8c2a02d68efd0fe8b4fa9bef60d.tar.gz | |
(lisp_data_to_selection_data): If OBJ is a non-ASCII
multibyte string, signal an error instead of aborting.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xselect.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xselect.c b/src/xselect.c index bf37cde4d0b..8d8efd8db8a 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -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; |
