From 0b2faf69c65283a27ab8f85b36339fff3ebbb9c8 Mon Sep 17 00:00:00 2001 From: Peter Valchev Date: Sat, 8 Jan 2005 05:20:35 +0000 Subject: 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 --- usr.bin/vi/vi/v_txt.c | 4 ++-- 1 file 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; -- cgit v1.2.3