Re: [PATCH] Re: Segfault on loading of non existent syntax file

2006-03-27 Thread Pavel Tsekov
On Thu, 2006-02-02 at 20:33 +0100, Leonard den Ottolander wrote: Ran mc from a temporary build dir and copied Syntax to ~/.mc/cedit/ . Tried editing a file and saw a segfault when the non existent syntax file is attempted to be loaded. #0 edit_get_rule (edit=0x92e8dc0, byte_index=-1)

Re: [PATCH] Re: Segfault on loading of non existent syntax file

2006-03-27 Thread Leonard den Ottolander
Hi Pavel, On Mon, 2006-03-27 at 11:08 +0200, Pavel Tsekov wrote: How about the attached fix ? I assume g_malloc0 initializes edit-rules with zeros? This indeed fixes the crash, but doesn't this cause a memory leak? Or is that memory freed elsewhere? Leonard. -- mount -t life -o ro /dev/dna

Re: [PATCH] Re: Segfault on loading of non existent syntax file

2006-03-27 Thread Leonard den Ottolander
Hi Pavel, On Mon, 2006-03-27 at 21:57 +0200, Leonard den Ottolander wrote: doesn't this cause a memory leak? Or is that memory freed elsewhere? Last statement in the skipped edit_free_syntax_rules() is a syntax_g_free(edit-rules). I guess we need a free. The zeroing by g_malloc0 only obscures

selecting text

2006-03-27 Thread Nerijus Baliunas
Hello, Selecting text in either viewer or editor does not detect line endings, and there are a lot of spaces when I paste. mc from FC5, mc-4.6.1a-10. Regards, Nerijus ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel

find in viewer

2006-03-27 Thread Nerijus Baliunas
Hello, Find in viewer does not remember its last search string: F3, F7, enter some text, Enter, F10. F3, F7 - search string field is empty. It used to remember earlier, and it doesn't happen with editor (editor remembers search string). mc-4.6.1a-10 from FC5. Regards, Nerijus

Re: [PATCH] Re: Segfault on loading of non existent syntax file

2006-03-27 Thread Pavel Tsekov
On Mon, 2006-03-27 at 11:08 +0200, Pavel Tsekov wrote: How about the attached fix ? I assume g_malloc0 initializes edit-rules with zeros? This indeed fixes the crash, but doesn't this cause a memory leak? Or is that memory freed elsewhere? In edit_read_syntax_rules () after the big for

Re: [PATCH] Re: Segfault on loading of non existent syntax file

2006-03-27 Thread Pavel Tsekov
On Mon, 2006-03-27 at 21:57 +0200, Leonard den Ottolander wrote: doesn't this cause a memory leak? Or is that memory freed elsewhere? Last statement in the skipped edit_free_syntax_rules() is a syntax_g_free(edit-rules). I guess we need a free. You guess .. I guess you should stop