From 57679c8695cd63c63dd33ba548fefdef68a5cca5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 9 May 2011 13:29:51 +0200 Subject: [PATCH] * w32menu.c (set_frame_menubar): Fix submenu allocation. --- src/ChangeLog | 4 ++++ src/w32menu.c | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 10ca2e250dc..6f70908caae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-05-09 Andreas Schwab + + * w32menu.c (set_frame_menubar): Fix submenu allocation. + 2011-05-07 Eli Zaretskii * w32console.c (Fset_screen_color): Doc fix. diff --git a/src/w32menu.c b/src/w32menu.c index c8c6a319b40..ca763b553cf 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -427,11 +427,10 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) menu_items = f->menu_bar_vector; menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; - submenu_start = (int *) alloca (ASIZE (items) * sizeof (int *)); - submenu_end = (int *) alloca (ASIZE (items) * sizeof (int *)); + submenu_start = (int *) alloca (ASIZE (items) * sizeof (int)); + submenu_end = (int *) alloca (ASIZE (items) * sizeof (int)); submenu_n_panes = (int *) alloca (ASIZE (items) * sizeof (int)); - submenu_top_level_items - = (int *) alloca (ASIZE (items) * sizeof (int *)); + submenu_top_level_items = (int *) alloca (ASIZE (items) * sizeof (int)); init_menu_items (); for (i = 0; i < ASIZE (items); i += 4) { -- 2.39.2