Subject: curses fix for sysinst
To: None <tech-userlevel@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 07/29/2003 10:35:42
I think I've found what causes sysinst to (try to) coredump when
asked to display the list of files.
Unless I'm going mad, the memcpy() calls shouldn't have the '* lines'.
Index: insdelln.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/insdelln.c,v
retrieving revision 1.9
diff -u -p -r1.9 insdelln.c
--- insdelln.c 2003/02/17 11:07:20 1.9
+++ insdelln.c 2003/07/29 09:26:54
@@ -107,8 +107,7 @@ winsdelln(WINDOW *win, int lines)
} else {
(void) memcpy(win->lines[y + lines]->line,
win->lines[y]->line,
- (size_t) win->maxx * __LDATASIZE * lines);
+ (size_t) win->maxx * __LDATASIZE);
temp = win->lines[y];
}
}
for (y = win->cury - 1 + lines; y >= win->cury; --y)
@@ -144,8 +143,7 @@ winsdelln(WINDOW *win, int lines)
} else {
(void) memcpy(win->lines[y]->line,
win->lines[y + lines]->line,
- (size_t) win->maxx * __LDATASIZE * lines);
+ (size_t) win->maxx * __LDATASIZE);
temp = win->lines[y + lines];
}
}
for (y = last - lines; y < last; y++)
This only happens doing insert/delete line or scroll on a subwin.
On normal windows the line buffers are moved.
David
--
David Laight: david@l8s.co.uk