Fix invalid menu items
This commit is contained in:
parent
f2cc401100
commit
3e4e95d9c3
5
menus.c
5
menus.c
@ -105,6 +105,7 @@ int menu_system(char *menufile) {
|
|||||||
}
|
}
|
||||||
menu[menu_items-1] = (struct menu_item *)malloc(sizeof(struct menu_item));
|
menu[menu_items-1] = (struct menu_item *)malloc(sizeof(struct menu_item));
|
||||||
menu[menu_items-1]->hotkey = buffer[7];
|
menu[menu_items-1]->hotkey = buffer[7];
|
||||||
|
menu[menu_items-1]->command = 0;
|
||||||
menu[menu_items-1]->data = NULL;
|
menu[menu_items-1]->data = NULL;
|
||||||
menu[menu_items-1]->seclevel = 0;
|
menu[menu_items-1]->seclevel = 0;
|
||||||
} else if (strncasecmp(buffer, "COMMAND", 7) == 0 && menu_items > 0) {
|
} else if (strncasecmp(buffer, "COMMAND", 7) == 0 && menu_items > 0) {
|
||||||
@ -457,7 +458,9 @@ int menu_system(char *menufile) {
|
|||||||
break;
|
break;
|
||||||
case MENU_SENDNODEMSG:
|
case MENU_SENDNODEMSG:
|
||||||
send_node_msg();
|
send_node_msg();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user