diff options
author | 2003-03-17 19:16:59 +0000 | |
---|---|---|
committer | 2003-03-17 19:16:59 +0000 | |
commit | 4700aafe2c09e3bf7bb4124a014ef9cb49af64fe (patch) | |
tree | 489c57bc6bc3861ec8fd554d3d2c853c9199eef9 /lib/libcurses/tty/hardscroll.c | |
parent | OpenBSD 3.3 has setreuid/setregid. (diff) | |
download | wireguard-openbsd-4700aafe2c09e3bf7bb4124a014ef9cb49af64fe.tar.xz wireguard-openbsd-4700aafe2c09e3bf7bb4124a014ef9cb49af64fe.zip |
use snprintf throughout
Diffstat (limited to 'lib/libcurses/tty/hardscroll.c')
-rw-r--r-- | lib/libcurses/tty/hardscroll.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libcurses/tty/hardscroll.c b/lib/libcurses/tty/hardscroll.c index c143201465e..92dc08ebe6d 100644 --- a/lib/libcurses/tty/hardscroll.c +++ b/lib/libcurses/tty/hardscroll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hardscroll.c,v 1.4 2002/06/22 18:13:05 deraadt Exp $ */ +/* $OpenBSD: hardscroll.c,v 1.5 2003/03/17 19:16:59 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,2000 Free Software Foundation, Inc. * @@ -273,7 +273,8 @@ _nc_linedump(void) (void) strcpy(buf, "virt"); for (n = 0; n < screen_lines; n++) - (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n)); + (void) snprintf(buf + strlen(buf), have - strlen(buf), " %02d", + OLDNUM(n)); TR(TRACE_UPDATE | TRACE_MOVE, (buf)); #if NO_LEAKS free(buf); |