Mercurial > emacs
diff src/lread.c @ 102300:d7ea9e8841d3
(read_escape): Signal an error for invalid \UXXXXXXXX.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 27 Feb 2009 00:48:03 +0000 |
parents | 12ffc72c0bbc |
children | 245a1f77b840 |
line wrap: on
line diff
--- a/src/lread.c Fri Feb 27 00:29:59 2009 +0000 +++ b/src/lread.c Fri Feb 27 00:48:03 2009 +0000 @@ -2205,7 +2205,7 @@ /* 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 @@ break; } } - + if (i > 0x10FFFF) + error ("Non-Unicode character: 0x%x", i); return i; }