summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2008-03-08 18:11:42 +0000
committerotto <otto@openbsd.org>2008-03-08 18:11:42 +0000
commit7e9eb8be5d2db9b48e31d3c4283decee32e856af (patch)
tree1731bc928191bc470200f64f928212b50e48eda6
parentCleanup/style(9) code and comments. (diff)
downloadwireguard-openbsd-7e9eb8be5d2db9b48e31d3c4283decee32e856af.tar.xz
wireguard-openbsd-7e9eb8be5d2db9b48e31d3c4283decee32e856af.zip
avoid inifite recursion on certain error conditions; from netbsd;
ok millert@
-rw-r--r--usr.bin/vi/vi/vs_refresh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/vi/vi/vs_refresh.c b/usr.bin/vi/vi/vs_refresh.c
index d54a7b69811..55fa2428b61 100644
--- a/usr.bin/vi/vi/vs_refresh.c
+++ b/usr.bin/vi/vi/vs_refresh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs_refresh.c,v 1.14 2006/03/11 06:58:00 ray Exp $ */
+/* $OpenBSD: vs_refresh.c,v 1.15 2008/03/08 18:11:42 otto Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -695,6 +695,8 @@ done_cursor:
abort();
#else
if (vip->sc_smap == NULL) {
+ if (F_ISSET(sp, SC_SCR_REFORMAT))
+ return (0);
F_SET(sp, SC_SCR_REFORMAT);
return (vs_paint(sp, flags));
}