summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2017-01-08 01:29:50 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2017-01-08 01:29:50 (GMT)
commit3436c097d2be579440a021fe418d22957db7dbe6 (patch)
tree0857fa5d59040d0776b2a2cc2e6d27ef8dfa9a94
parentbf3ba5c97bac5aa79c43153311ea0d3d5945bd4d (diff)
downloadnetsurf-3436c097d2be579440a021fe418d22957db7dbe6.tar.gz
netsurf-3436c097d2be579440a021fe418d22957db7dbe6.tar.bz2
Ensure we free the NM_END menu item
-rw-r--r--frontends/amiga/menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index d815932..88a875e 100644
--- a/frontends/amiga/menu.c
+++ b/frontends/amiga/menu.c
@@ -547,7 +547,7 @@ static void ami_menu_free_labs(struct ami_menu_data **md, int max)
{
int i;
- for(i = 0; i < max; i++) {
+ for(i = 0; i <= max; i++) {
if(md[i] == NULL) continue;
if(md[i]->menulab && (md[i]->menulab != NM_BARLABEL)) {
if(md[i]->menutype & MENU_IMAGE) {
@@ -569,7 +569,7 @@ void ami_free_menulabs(struct ami_menu_data **md)
{
int i;
- for(i=0;i<AMI_MENU_AREXX_MAX;i++) {
+ for(i=0;i<=AMI_MENU_AREXX_MAX;i++) {
if(md[i] == NULL) continue;
if(md[i]->menulab && (md[i]->menulab != NM_BARLABEL)) {
if(md[i]->menutype & MENU_IMAGE) {