aboutsummaryrefslogtreecommitdiff
path: root/ncurses/tty/hardscroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncurses/tty/hardscroll.c')
-rw-r--r--ncurses/tty/hardscroll.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ncurses/tty/hardscroll.c b/ncurses/tty/hardscroll.c
index 4ec168a0028e..f7c9e0d46f52 100644
--- a/ncurses/tty/hardscroll.c
+++ b/ncurses/tty/hardscroll.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -147,7 +147,7 @@ AUTHOR
#include <curses.priv.h>
-MODULE_ID("$Id: hardscroll.c,v 1.51 2012/10/17 09:01:10 tom Exp $")
+MODULE_ID("$Id: hardscroll.c,v 1.53 2016/05/28 23:32:40 tom Exp $")
#if defined(SCROLLDEBUG) || defined(HASHDEBUG)
@@ -300,11 +300,12 @@ NCURSES_EXPORT(void)
NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_DCL0)
/* dump the state of the real and virtual oldnum fields */
{
- int n;
char *buf = 0;
size_t want = ((size_t) screen_lines(SP_PARM) + 1) * 4;
+ (void) SP_PARM;
if ((buf = typeMalloc(char, want)) != 0) {
+ int n;
*buf = '\0';
for (n = 0; n < screen_lines(SP_PARM); n++)
@@ -339,7 +340,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
for (;;) {
int n;
- for (n = 0; n < screen_lines; n++)
+ for (n = 0; n < screen_lines(sp); n++)
oldnums[n] = _NEWINDEX;
/* grab the test vector */