]> granicus.if.org Git - vim/commitdiff
Fixed: crash with ":find " completion, using uninitialized count.
authorBram Moolenaar <Bram@vim.org>
Mon, 19 Jul 2010 21:11:27 +0000 (23:11 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 19 Jul 2010 21:11:27 +0000 (23:11 +0200)
src/misc1.c

index e34f033bd263013321e600a329401fa2dcff3972..cd5ae4b2f66ab12ca926b935f1b9dc186e2e0a55 100644 (file)
@@ -8550,7 +8550,7 @@ expand_wildcards_eval(pat, num_file, file, flags)
 /*
  * Expand wildcards.  Calls gen_expand_wildcards() and removes files matching
  * 'wildignore'.
- * Returns OK or FAIL.
+ * Returns OK or FAIL.  When FAIL then "num_file" won't be set.
  */
     int
 expand_wildcards(num_pat, pat, num_file, file, flags)
@@ -8568,7 +8568,7 @@ expand_wildcards(num_pat, pat, num_file, file, flags)
     retval = gen_expand_wildcards(num_pat, pat, num_file, file, flags);
 
     /* When keeping all matches, return here */
-    if (flags & EW_KEEPALL)
+    if ((flags & EW_KEEPALL) || retval == FAIL)
        return retval;
 
 #ifdef FEAT_WILDIGN