diff --git a/libbb/lineedit.c b/libbb/lineedit.c index d6b2e76ff..ed7c42ba8 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -825,8 +825,8 @@ static unsigned path_parse(char ***p) res[npth++] = tmp; } /* special case: "match subdirectories of the current directory" */ - /*res[npth++] = NULL; - filled by xzalloc() */ - return npth; + /*res[npth] = NULL; - filled by xzalloc() */ + return npth + 1; } /* Complete command, directory or file name.