From 597881b50f81100f3e65a0dfe136a39ec3f4b609 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 2 Jan 1999 02:21:14 +0000 Subject: [PATCH] 1999-01-01 Miguel de Icaza * gscreen.c (panel_fill_panel_list): Assertion that will pin point if a CList gets out of sync with the panel->format. 1999-01-01 Momchil 'Velco' Velikov * gscreen.c (panel_fill_panel_list): NULL terminate the column array. This is strange, as it should not need the ending NULL. 1999-01-01 Jonathan Blandford --- gnome/ChangeLog | 10 ++++++++++ gnome/gscreen.c | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 2b9a16084..85f56f417 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,13 @@ +1999-01-01 Miguel de Icaza + + * gscreen.c (panel_fill_panel_list): Assertion that will pin point + if a CList gets out of sync with the panel->format. + +1999-01-01 Momchil 'Velco' Velikov + + * gscreen.c (panel_fill_panel_list): NULL terminate the column + array. This is strange, as it should not need the ending NULL. + 1999-01-01 Jonathan Blandford * gcmd.c ((GtkWidget *widget, WPanel *panel): Now hooked up diff --git a/gnome/gscreen.c b/gnome/gscreen.c index 6b894709b..b87b9dcee 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -163,7 +163,7 @@ panel_fill_panel_list (WPanel *panel) int i, col, type_col, color; char **texts; - texts = malloc (sizeof (char *) * items); + texts = malloc (sizeof (char *) * (items+1)); gtk_clist_freeze (GTK_CLIST (cl)); gtk_clist_clear (GTK_CLIST (cl)); @@ -171,6 +171,9 @@ panel_fill_panel_list (WPanel *panel) /* which column holds the type information */ type_col = -1; + g_assert (items == GTK_CLIST (cl->columns)); + + texts [items] = NULL; for (i = 0; i < top; i++){ file_entry *fe = &panel->dir.list [i]; format_e *format = panel->format;