From cd8a1d6bfdc5aebc34348801dbaca06f2f4986c5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 8 May 2019 09:29:20 +0300 Subject: [PATCH] Add an assertion to xdisp.c * src/xdisp.c (display_mode_element): Add an assertion where we assume that 'string' returned by decode_mode_spec is always either a Lisp string or nil. --- src/xdisp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xdisp.c b/src/xdisp.c index 63ca677e362..d380645c849 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -24026,6 +24026,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, ? string_byte_to_char (elt, bytepos) : bytepos); spec = decode_mode_spec (it->w, c, field, &string); + eassert (NILP (string) || STRINGP (string)); multibyte = !NILP (string) && STRING_MULTIBYTE (string); switch (mode_line_target) -- 2.39.5