]> git.eshelyaron.com Git - emacs.git/commitdiff
(display_mode_element): Don't read past end of string if it ends with '%'.
authorAndreas Schwab <schwab@suse.de>
Fri, 7 Dec 2001 13:35:25 +0000 (13:35 +0000)
committerAndreas Schwab <schwab@suse.de>
Fri, 7 Dec 2001 13:35:25 +0000 (13:35 +0000)
src/ChangeLog
src/xdisp.c

index 0759eb45beafd735f3af4dd1728f48ee579d46b1..5dc657958293c4d42a69a0f34ed7b8c83f4c242a 100644 (file)
@@ -1,5 +1,8 @@
 2001-12-07  Andreas Schwab  <schwab@suse.de>
 
+       * xdisp.c (display_mode_element): Don't read past end of string if
+       it ends with '%'.
+
        * alloc.c (inhibit_garbage_collection): Don't exceed value an int
        can hold.
 
index d103230a6981e90d0bacf7a036d65eaaad10473c..91558067d1f59d4cb12c2de6e5ad6af93a525378 100644 (file)
@@ -13461,7 +13461,7 @@ display_mode_line (w, face_id, format)
    FIELD_WIDTH is the number of characters the display of ELT should
    occupy in the mode line, and PRECISION is the maximum number of
    characters to display from ELT's representation.  See
-   display_string for details.  *
+   display_string for details.
 
    Returns the hpos of the end of the text generated by ELT.  */
 
@@ -13584,6 +13584,8 @@ display_mode_element (it, depth, field_width, precision, elt)
                          }
                      }
                  }
+               else /* c == 0 */
+                 break;
              }
          }
       }