Re: Crash on hexediting empty file



On Wed, 1 Feb 2006, Leonard den Ottolander wrote:

> Hi,
>
> Try F3 -> F4 -> F2 on an empty file. Boom, ouch. (Might be that if you
> still are in edit mode you need to try after getting back in view mode.)

Patch is attached. I'll not commit this before Roland comments . There are
multiple ways to fix this and I think this one is ok but ...
Index: src/view.c
===================================================================
RCS file: /cvsroot/mc/mc/src/view.c,v
retrieving revision 1.353
diff -u -p -r1.353 view.c
--- src/view.c	1 Feb 2006 15:59:21 -0000	1.353
+++ src/view.c	2 Feb 2006 08:49:45 -0000
@@ -2901,7 +2901,7 @@ view_labels (WView *view)
 	    my_define (h, 2, Q_("ButtonBar|Edit"),
 		view_toggle_hexedit_mode_cmd, view);
 	} else {
-	    my_define (h, 2, "", NULL, view);
+	    buttonbar_clear_label (h, 2);
 	}
 	my_define (h, 6, Q_("ButtonBar|Save"),
 	    view_hexedit_save_changes_cmd, view);


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