]> granicus.if.org Git - mutt/commitdiff
patch-bac.chdir-20010523.2
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 24 May 2001 09:57:32 +0000 (09:57 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 24 May 2001 09:57:32 +0000 (09:57 +0000)
browser.c

index 50a8b25ca602018d0d719ff90cb860d5b8679712..7d259dd709bf866554139831a93eb7a964c4045d 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -909,7 +909,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
        {
          /* add '/' at the end of the directory name if not already there */
          int len=mutt_strlen(LastDir);
-         if (LastDir[len-1] != '/' && sizeof (buf) > len)
+         if (len && LastDir[len-1] != '/' && sizeof (buf) > len)
            buf[len]='/';
        }