aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 7e92be89865..7f635777d0b 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -618,7 +618,12 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.")
618 bother checking further intervals. */ 618 bother checking further intervals. */
619 if (EQ (limit, Qt)) 619 if (EQ (limit, Qt))
620 { 620 {
621 XSETFASTINT (pos, next->position - (STRINGP (object))); 621 if (NULL_INTERVAL_P (next))
622 XSETFASTINT (pos, (STRINGP (object)
623 ? XSTRING (object)->size
624 : BUF_ZV (XBUFFER (object))));
625 else
626 XSETFASTINT (pos, next->position - (STRINGP (object)));
622 return pos; 627 return pos;
623 } 628 }
624 629