Adding missing loop counter for menu.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@809 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
james.goppert 2010-11-09 01:58:00 +00:00
parent 687f5ebc00
commit 33a7d26846
1 changed files with 6 additions and 4 deletions

View File

@ -89,10 +89,12 @@ Menu::run(void)
// populate arguments that have not been specified with "" and 0
// this is safer than NULL in the case where commands may look
// without testing argc
while (argc <= MENU_ARGS_MAX) {
_argv[argc].str = "";
_argv[argc].i = 0;
_argv[argc].f = 0;
i = argc;
while (i <= MENU_ARGS_MAX) {
_argv[i].str = "";
_argv[i].i = 0;
_argv[i].f = 0;
i++;
}
// look for a command matching the first word (note that it may be empty)