From 7b794d551e5a1bc08333dfda388f866f20aac052 Mon Sep 17 00:00:00 2001 From: Christoph Hohmann Date: Thu, 16 Aug 2001 23:29:37 +0000 Subject: [PATCH] fixed segfault in mainwindow.c --- ChangeLog.claws | 9 +++++++++ src/mainwindow.c | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index e049bc77a..09da71b98 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,12 @@ +2001-08-17 [christoph] + + * src/mainwindow.c + claws uses 4 colors for target folder coloring. + arrays were not long enough and destroyed the + stack causing a segfault. + target folder colorizing does not work anymore + for me + 2001-08-16 [paul] * configure.in diff --git a/src/mainwindow.c b/src/mainwindow.c index 4740b2707..0d9c9663d 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -594,8 +594,8 @@ MainWindow *main_window_create(SeparateType type) SummaryView *summaryview; MessageView *messageview; GdkColormap *colormap; - GdkColor color[3]; - gboolean success[3]; + GdkColor color[4]; + gboolean success[4]; guint n_menu_entries; GtkItemFactory *ifactory; GtkWidget *ac_menu; @@ -718,8 +718,8 @@ MainWindow *main_window_create(SeparateType type) color[3] = folderview->color_op; colormap = gdk_window_get_colormap(window->window); - gdk_colormap_alloc_colors(colormap, color, 3, FALSE, TRUE, success); - for (i = 0; i < 3; i++) { + gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success); + for (i = 0; i < 4; i++) { if (success[i] == FALSE) g_warning(_("MainWindow: color allocation %d failed\n"), i); } -- 2.25.1