fixed segfault in mainwindow.c
authorChristoph Hohmann <reboot@gmx.ch>
Thu, 16 Aug 2001 23:29:37 +0000 (23:29 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Thu, 16 Aug 2001 23:29:37 +0000 (23:29 +0000)
ChangeLog.claws
src/mainwindow.c

index e049bc77adc5e1b2452805219d64fba14d641801..09da71b98425480afe2a6229f439b03c41b15377 100644 (file)
@@ -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
index 4740b27073c8d95532b32fae146572b8d393dfc6..0d9c9663df5715628f75ee3481e6faff29425c0c 100644 (file)
@@ -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);
        }