diff options
Diffstat (limited to 'src/menu.c')
| -rw-r--r-- | src/menu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/menu.c b/src/menu.c index 7a3edcb6f4f..705100381d5 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -176,6 +176,8 @@ save_menu_items (void) | |||
| 176 | static void | 176 | static void |
| 177 | grow_menu_items (void) | 177 | grow_menu_items (void) |
| 178 | { | 178 | { |
| 179 | if ((INT_MAX - MENU_ITEMS_PANE_LENGTH) / 2 < menu_items_allocated) | ||
| 180 | memory_full (); | ||
| 179 | menu_items_allocated *= 2; | 181 | menu_items_allocated *= 2; |
| 180 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); | 182 | menu_items = larger_vector (menu_items, menu_items_allocated, Qnil); |
| 181 | } | 183 | } |