From 67022400e72d2b80461fa3e8bd6d236e38bbd6cf Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Mon, 26 Apr 2010 16:52:00 +0000 Subject: Fix a bug in auto-completion accidentally introduced when support for auto-completion of filenames containing whitespace was added. This bug was tracked a decade ago in NetBSD as pr 7014. ok deraadt --- usr.bin/ftp/complete.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/ftp/complete.c b/usr.bin/ftp/complete.c index 2092cb8cfd1..c453d54f444 100644 --- a/usr.bin/ftp/complete.c +++ b/usr.bin/ftp/complete.c @@ -1,4 +1,4 @@ -/* $OpenBSD: complete.c,v 1.25 2010/04/25 14:32:04 tedu Exp $ */ +/* $OpenBSD: complete.c,v 1.26 2010/04/26 16:51:59 stsp Exp $ */ /* $NetBSD: complete.c,v 1.10 1997/08/18 10:20:18 lukem Exp $ */ /*- @@ -102,7 +102,7 @@ complete_ambiguous(char *word, int list, StringList *words) } if (matchlen > wordlen) { ftpvis(insertstr, sizeof(insertstr), - lastmatch + wordlen, matchlen); + lastmatch + wordlen, matchlen - wordlen); if (el_insertstr(el, insertstr) == -1) return (CC_ERROR); else -- cgit v1.2.3