]> granicus.if.org Git - neomutt/commitdiff
_Really_ fix an unset or too short StChars varialbe. (From Vikas.)
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 29 Sep 1998 15:40:01 +0000 (15:40 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 29 Sep 1998 15:40:01 +0000 (15:40 +0000)
status.c

index 3303ceae37b2d9c76b4c7d0882f1d806cc0eb286..192e6b179b8f3417b3994201e041b6eec9bf12fb 100644 (file)
--- 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];