From 1e792e4d80f58bdb5b460518729eb0585b10f8d3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 4 Apr 2011 12:30:48 -0700 Subject: * textprop.c (set_text_properties_1): Change while to do-while, since the condition is always true at first. --- src/textprop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/textprop.c') diff --git a/src/textprop.c b/src/textprop.c index cd89efeb38d..53f92ec936b 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -1379,8 +1379,8 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie i = next_interval (i); } - /* We are starting at the beginning of an interval, I */ - while (len > 0) + /* We are starting at the beginning of an interval I. LEN is positive. */ + do { if (i == 0) abort (); @@ -1412,6 +1412,7 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie i = next_interval (i); } + while (len > 0); } DEFUN ("remove-text-properties", Fremove_text_properties, -- cgit v1.2.1