From 6ac760b1e4fe5070c61dbb8344d664098fb9dfe0 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 29 Sep 1998 15:40:01 +0000 Subject: [PATCH] _Really_ fix an unset or too short StChars varialbe. (From Vikas.) --- status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/status.c b/status.c index 3303ceae3..192e6b179 100644 --- a/status.c +++ b/status.c @@ -208,7 +208,9 @@ status_format_str (char *buf, size_t buflen, char op, const char *src, (Context->changed || Context->deleted) ? 1 : 0); } - if(!StChars || i >= strlen(StChars)) + if (!StChars) + buf[0] = 0; + else if (i >= strlen(StChars)) buf[0] = StChars[0]; else buf[0] = StChars[i]; -- 2.40.0