summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/lineedit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index b942f540a..625884adf 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.