Fix warnings: eval.c: get_user_func_name(): Np dereference: FP.

Problem    : Dereference of null pointer @ 18216.
Diagnostic : False positive.
Rationale  : `hi` and `done` are static. Intended usage is for the first
             call to have idx == 0, so that they are initialized.
Resolution : Assert hi after (optional) initialization.
This commit is contained in:
Eliseo Martínez
2014-11-17 10:24:07 +01:00
parent eb15d8777b
commit 34a4a01e4e

View File

@@ -18280,6 +18280,7 @@ char_u *get_user_func_name(expand_T *xp, int idx)
done = 0;
hi = func_hashtab.ht_array;
}
assert(hi);
if (done < func_hashtab.ht_used) {
if (done++ > 0)
++hi;