]> granicus.if.org Git - neomutt/commitdiff
_mutt_enter_fname: verify that flag is not zero 712/head
authorJenya Sovetkin <e.sovetkin@gmail.com>
Wed, 9 Aug 2017 11:01:19 +0000 (13:01 +0200)
committerRichard Russon <rich@flatcap.org>
Wed, 9 Aug 2017 12:15:25 +0000 (13:15 +0100)
The flag argument in the _mutt_enter_fname function might not be
zero (e.g. in the definition of the mutt_enter_vfolder function, see
protos.h:297).

Fixes #707

curs_lib.c

index 019fd78a45f420ed10cd5e609d7e268ba9843ff9..864ab11ef1d03cc1d70b7b7b227c6805bb3ce5ba 100644 (file)
@@ -915,7 +915,9 @@ int _mutt_enter_fname(const char *prompt, char *buf, size_t blen, int buffy,
   {
     mutt_refresh();
     buf[0] = 0;
-    flags = MUTT_SEL_FOLDER;
+
+    if (!flags)
+      flags = MUTT_SEL_FOLDER;
     if (multiple)
       flags |= MUTT_SEL_MULTI;
     if (buffy)