changeset 41532:afe70a164d3b

(set_text_properties_1): Clearly mark that the interval should not be empty.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 26 Nov 2001 02:19:38 +0000
parents 960d5d2165b3
children 0dabd1022a9e
files src/textprop.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/textprop.c	Mon Nov 26 02:16:59 2001 +0000
+++ b/src/textprop.c	Mon Nov 26 02:19:38 2001 +0000
@@ -1303,7 +1303,8 @@
    properties PROPERTIES.  BUFFER is the buffer containing
    the text.  This does not obey any hooks.
    You can provide the interval that START is located in as I,
-   or pass NULL for I and this function will find it.  */
+   or pass NULL for I and this function will find it.
+   This function assumes that START < END.  */
 
 void
 set_text_properties_1 (start, end, properties, buffer, i)
@@ -1316,6 +1317,7 @@
 
   s = XINT (start);
   len = XINT (end) - s;
+  eassert (len > 0);
   if (i == 0)
     i = find_interval (BUF_INTERVALS (XBUFFER (buffer)), s);