diff options
author | Kenichi Handa <handa@m17n.org> | 2009-02-27 00:49:09 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2009-02-27 00:49:09 +0000 |
commit | a808f22d62942d8106e05ea685f43e80b682df49 (patch) | |
tree | c9ada0a843794ff7bda7fc8be9e0b566e9fa7911 /src/lread.c | |
parent | b61137ea4bcc42d0fa3659ac7f3b0ef57c622444 (diff) | |
download | emacs-a808f22d62942d8106e05ea685f43e80b682df49.tar.gz |
(read_escape): Signal an error for invalid \UXXXXXXXX.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c index 063adba1d9a..e4ba5229e20 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2205,7 +2205,7 @@ read_escape (readcharfun, stringp) /* A Unicode escape. We only permit them in strings and characters, not arbitrarily in the source code, as in some other languages. */ { - int i = 0; + unsigned int i = 0; int count = 0; while (++count <= unicode_hex_count) @@ -2222,7 +2222,8 @@ read_escape (readcharfun, stringp) break; } } - + if (i > 0x10FFFF) + error ("Non-Unicode character: 0x%x", i); return i; } |