+2002-04-22 Kim F. Storm <storm@cua.dk>
+
+ * textprop.c (remove_properties): Fixed trap for malformed plist.
+
2002-04-22 Richard M. Stallman <rms@gnu.org>
* window.c (make_window): Initialize height_fixed_p,
register Lisp_Object tail1, tail2, sym, current_plist;
register int changed = 0;
- /* Nonzero means tail1 is a list, otherwise it is a plist. */
- int use_list;
+ /* Nonzero means tail1 is a plist, otherwise it is a list. */
+ int use_plist;
current_plist = i->plist;
if (! NILP (plist))
- tail1 = plist, use_list = 0;
+ tail1 = plist, use_plist = 1;
else
- tail1 = list, use_list = 1;
+ tail1 = list, use_plist = 0;
/* Go through each element of LIST or PLIST. */
while (! NILP (tail1))
}
/* Advance thru TAIL1 one way or the other. */
- if (use_list)
+ tail1 = XCDR (tail1);
+ if (use_plist && CONSP (tail1))
tail1 = XCDR (tail1);
- else
- tail1 = XCDR (XCDR (tail1));
}
if (changed)