aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-07-05 08:13:50 +0000
committerJim Blandy1993-07-05 08:13:50 +0000
commitb1e94638f6da95840698d05c3c2c400778df22b2 (patch)
tree006c38b51846287ec14f6dc88244d31dd052fe6d /src
parent375aa801bac081fcb10f105b73fd7fbd2c535567 (diff)
downloademacs-b1e94638f6da95840698d05c3c2c400778df22b2.tar.gz
emacs-b1e94638f6da95840698d05c3c2c400778df22b2.zip
* textprop.c (validate_interval_range): Don't increment both
*begin and *end if they point to the same thing. (validate_plist): Call QUIT while scanning LIST.
Diffstat (limited to 'src')
-rw-r--r--src/textprop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c
index d22178d0aa3..384682cd256 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -141,7 +141,8 @@ validate_interval_range (object, begin, end, force)
141 /* User-level Positions in strings start with 0, 141 /* User-level Positions in strings start with 0,
142 but the interval code always wants positions starting with 1. */ 142 but the interval code always wants positions starting with 1. */
143 XFASTINT (*begin) += 1; 143 XFASTINT (*begin) += 1;
144 XFASTINT (*end) += 1; 144 if (begin != end)
145 XFASTINT (*end) += 1;
145 i = s->intervals; 146 i = s->intervals;
146 147
147 if (s->size == 0) 148 if (s->size == 0)
@@ -173,7 +174,10 @@ validate_plist (list)
173 register int i; 174 register int i;
174 register Lisp_Object tail; 175 register Lisp_Object tail;
175 for (i = 0, tail = list; !NILP (tail); i++) 176 for (i = 0, tail = list; !NILP (tail); i++)
176 tail = Fcdr (tail); 177 {
178 tail = Fcdr (tail);
179 QUIT;
180 }
177 if (i & 1) 181 if (i & 1)
178 error ("Odd length text property list"); 182 error ("Odd length text property list");
179 return list; 183 return list;