mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
Fix last change in bidi_mirror_char.
This commit is contained in:
parent
f3dd73121c
commit
9e1a06fcf8
@ -1,3 +1,7 @@
|
||||
2012-05-27 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* bidi.c (bidi_mirror_char): Fix last change.
|
||||
|
||||
2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* unexmacosx.c (copy_data_segment): Truncate after 16 characters
|
||||
|
12
src/bidi.c
12
src/bidi.c
@ -204,8 +204,18 @@ bidi_mirror_char (int c)
|
||||
val = CHAR_TABLE_REF (bidi_mirror_table, c);
|
||||
if (INTEGERP (val))
|
||||
{
|
||||
int v = XINT (val);
|
||||
|
||||
/* In a build with extra checks, make sure the value does not
|
||||
overflow a 32-bit int. */
|
||||
eassert (CHAR_VALID_P (XINT (val)));
|
||||
return XINT (val);
|
||||
|
||||
/* Minimal test we must do in optimized builds, to prevent weird
|
||||
crashes further down the road. */
|
||||
if (v < 0 || v > MAX_CHAR)
|
||||
abort ();
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
return c;
|
||||
|
Loading…
Reference in New Issue
Block a user