From: Andreas Schwab Date: Fri, 7 Dec 2001 13:35:25 +0000 (+0000) Subject: (display_mode_element): Don't read past end of string if it ends with '%'. X-Git-Tag: ttn-vms-21-2-B4~17860 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b85238397a4bfe4391e23029fce5ab6ff3fa2937;p=emacs.git (display_mode_element): Don't read past end of string if it ends with '%'. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0759eb45bea..5dc65795829 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-12-07 Andreas Schwab + * 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. diff --git a/src/xdisp.c b/src/xdisp.c index d103230a698..91558067d1f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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; } } }