From: lostd Date: Tue, 27 Jan 2015 07:47:56 +0000 (+0200) Subject: Fix segfault when a non-matching filter is applied twice X-Git-Tag: v1.0~92^2~93 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9679e132d48dc6e39e3e4e0798aed75696784ba3;p=nnn.git Fix segfault when a non-matching filter is applied twice --- diff --git a/noice.c b/noice.c index aa0e8723..bd35eaa6 100644 --- a/noice.c +++ b/noice.c @@ -678,7 +678,8 @@ nochange: filter_re = re; DPRINTF_S(filter); /* Save current */ - oldpath = makepath(path, dents[cur].name); + if (n > 0) + oldpath = makepath(path, dents[cur].name); goto out; case SEL_NEXT: if (cur < n - 1)