From 08c69054d793b553b7931bf414c717ef0348c610 Mon Sep 17 00:00:00 2001 From: Brian Barto Date: Wed, 15 Nov 2017 15:36:43 -0500 Subject: [PATCH] Fix for issue 8 reported on github. Trying to free one too many array indices on program exit. modified: src/menu.c --- src/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu.c b/src/menu.c index c7cd05c..fd36f61 100644 --- a/src/menu.c +++ b/src/menu.c @@ -205,7 +205,7 @@ void menu_execute(int lo) { void menu_free_all(void) { int i; - for (i = 0; i <= menu_count; ++i) { + for (i = 0; i < menu_count; ++i) { free(menu[i]); free(command[i]); }