diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-04-26 16:52:00 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-04-26 16:52:00 +0000 |
commit | 67022400e72d2b80461fa3e8bd6d236e38bbd6cf (patch) | |
tree | 7b4897830f47f0b91a0a19c026a390a0fee9bd68 /usr.bin/ftp | |
parent | 0db4268ce2b77e45f899802013f4297a41dcabbc (diff) |
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
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r-- | usr.bin/ftp/complete.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |