Fix bug #10696 with crash when an empty display string is at BOB.

src/keyboard.c (adjust_point_for_property): Don't position point
 before BEGV.
This commit is contained in:
Eli Zaretskii 2012-02-04 11:27:03 +02:00
parent e96e30135e
commit d6fa96a61f
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-02-04 Eli Zaretskii <eliz@gnu.org>
* keyboard.c (adjust_point_for_property): Don't position point
before BEGV. (Bug#10696)
2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
Handle overflow when computing char display width (Bug#9496).

View file

@ -1749,7 +1749,9 @@ adjust_point_for_property (EMACS_INT last_pt, int modified)
{
xassert (end > PT);
SET_PT (PT < last_pt
? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg)
? (STRINGP (val) && SCHARS (val) == 0
? max (beg - 1, BEGV)
: beg)
: end);
check_composition = check_invisible = 1;
}