Coverity: CID 400010: Improper use of negative value
authorNelson Ferreira <nelson.ferreira@ieee.org>
Wed, 7 Mar 2012 15:21:00 +0000 (10:21 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Wed, 7 Mar 2012 15:21:00 +0000 (10:21 -0500)
* src/ui/minibuf.c (echo_area_append): Make sure length<0 also
returns early here.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/ui/minibuf.c

index 28c7d1c..3627e6c 100644 (file)
@@ -680,7 +680,7 @@ echo_area_append(struct frame *f, const Bufbyte * nonreloc, Lisp_Object reloc,
        fixup_internal_substring(nonreloc, reloc, offset, &length);
 
        /* also check it here, in case the string was really blank. */
-       if (length == 0)
+       if (length <= 0)
                return;
 
        if (!NILP(Ffboundp(Qappend_message))) {