Re: cons.handler.c for FreeBSD



hi, there!

On Wed, Mar 05, 2003 at 10:34:21PM +0600, Max Khon wrote:

> > and it is still not obvious to me how I can test "output lines"
> > with Ctrl-O.
> 
> another question is about non-standard console modes.
> I (and other users) are getting core dumps when console video mode
> is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere
> inside ncurses. The backtrace is:

[...]

> can you take a look at this bug?

I have fixed the bug. Diff against trunk is attached

/fjoe
Index: cons.handler.c
===================================================================
RCS file: /cvs/gnome/mc/src/cons.handler.c,v
retrieving revision 1.17
diff -u -p -r1.17 cons.handler.c
--- cons.handler.c	5 Mar 2003 09:29:31 -0000	1.17
+++ cons.handler.c	5 Mar 2003 17:13:17 -0000
@@ -403,7 +403,7 @@ console_init (void)
     screen_shot.xsize = screen_info.mv_csz;
     screen_shot.ysize = screen_info.mv_rsz;
     if ((screen_shot.buf =
-	 g_malloc (screen_info.mv_csz * screen_info.mv_rsz)) == NULL)
+	 g_malloc (screen_info.mv_csz * screen_info.mv_rsz * 2)) == NULL)
 	return;
 
     console_flag = 1;
@@ -499,7 +499,7 @@ console_save (void)
 
     if (ioctl (FD_OUT, GIO_SCRNMAP, &map) == -1) {
 	console_shutdown ();
-	exit (1);
+	return;
     }
 
     for (i = 0; i < 256; i++) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]