diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2005-01-08 05:20:35 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2005-01-08 05:20:35 +0000 |
commit | 0b2faf69c65283a27ab8f85b36339fff3ebbb9c8 (patch) | |
tree | 04c31600190e718535650f4902fbbd12ac58fa82 /usr.bin/vi | |
parent | 021be0ce4540327d8a286e8cbec726576b34f97f (diff) |
Move a line of code which was "obviously" misplaced.
This fixes a core dump when auto-completing filenames and at least one of the
file names is larger than the screen width.
from NetBSD PR and fix by Peter Bex in PR#28382
Diffstat (limited to 'usr.bin/vi')
-rw-r--r-- | usr.bin/vi/vi/v_txt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vi/vi/v_txt.c b/usr.bin/vi/vi/v_txt.c index a557906ccfa..29948fb1a6f 100644 --- a/usr.bin/vi/vi/v_txt.c +++ b/usr.bin/vi/vi/v_txt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: v_txt.c,v 1.14 2005/01/08 05:18:52 pvalchev Exp $ */ +/* $OpenBSD: v_txt.c,v 1.15 2005/01/08 05:20:34 pvalchev Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -2219,8 +2219,8 @@ txt_fc_col(sp, argc, argv) /* If the largest file name is too large, just print them. */ if (colwidth > sp->cols) { - p = msg_print(sp, av[0]->bp + prefix, &nf); for (ac = argc, av = argv; ac > 0; --ac, ++av) { + p = msg_print(sp, av[0]->bp + prefix, &nf); (void)ex_printf(sp, "%s\n", p); if (F_ISSET(gp, G_INTERRUPTED)) break; |