Commit 7e2cac20 authored by Paul Eggert's avatar Paul Eggert
Browse files

* coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.

parent ce4d90b5
2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
* coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
* xterm.c (x_catch_errors): Remove duplicate declaration.
* term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
......
......@@ -9023,7 +9023,7 @@ Return the corresponding character. */)
{
Lisp_Object spec, attrs, val;
struct charset *charset_roman, *charset_kanji, *charset_kana, *charset;
int c;
EMACS_INT c;
CHECK_NATNUM (code);
c = XFASTINT (code);
......@@ -9048,7 +9048,8 @@ Return the corresponding character. */)
}
else
{
int c1 = c >> 8, c2 = c & 0xFF;
EMACS_INT c1 = c >> 8;
int c2 = c & 0xFF;
if (c1 < 0x81 || (c1 > 0x9F && c1 < 0xE0) || c1 > 0xEF
|| c2 < 0x40 || c2 == 0x7F || c2 > 0xFC)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment