mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-10 05:30:45 -08:00
Give a better error message when reading invalid "\unicode" escapes.
* src/lread.c (read_escape): Give a clearer error message on Unicode escape sequences (bug#36988).
This commit is contained in:
parent
e7d3ddf689
commit
fbbc257190
1 changed files with 2 additions and 1 deletions
|
|
@ -2585,7 +2585,8 @@ read_escape (Lisp_Object readcharfun, bool stringp)
|
|||
want. */
|
||||
int digit = char_hexdigit (c);
|
||||
if (digit < 0)
|
||||
error ("Non-hex digit used for Unicode escape");
|
||||
error ("Non-hex character used for Unicode escape: %c (%d)",
|
||||
c, c);
|
||||
i = (i << 4) + digit;
|
||||
}
|
||||
if (i > 0x10FFFF)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue