aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-02-04 11:27:03 +0200
committerEli Zaretskii2012-02-04 11:27:03 +0200
commitd6fa96a61fbded6a8c4cea832bd6ad225202b30e (patch)
tree00a45f4ceccebfc4a1ef5e452be29da59209ef79 /src
parente96e30135ec98caa6ac3a0d662dc73ed428f1d4f (diff)
downloademacs-d6fa96a61fbded6a8c4cea832bd6ad225202b30e.tar.gz
emacs-d6fa96a61fbded6a8c4cea832bd6ad225202b30e.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/keyboard.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d6decb7b40e..40ad7a9f507 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-02-04 Eli Zaretskii <eliz@gnu.org>
2
3 * keyboard.c (adjust_point_for_property): Don't position point
4 before BEGV. (Bug#10696)
5
12012-02-03 Paul Eggert <eggert@cs.ucla.edu> 62012-02-03 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Handle overflow when computing char display width (Bug#9496). 8 Handle overflow when computing char display width (Bug#9496).
diff --git a/src/keyboard.c b/src/keyboard.c
index c92f8f3f806..d4ff3c58f9b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1749,7 +1749,9 @@ adjust_point_for_property (EMACS_INT last_pt, int modified)
1749 { 1749 {
1750 xassert (end > PT); 1750 xassert (end > PT);
1751 SET_PT (PT < last_pt 1751 SET_PT (PT < last_pt
1752 ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg) 1752 ? (STRINGP (val) && SCHARS (val) == 0
1753 ? max (beg - 1, BEGV)
1754 : beg)
1753 : end); 1755 : end);
1754 check_composition = check_invisible = 1; 1756 check_composition = check_invisible = 1;
1755 } 1757 }