From 523acc1c54c7738a743ce9d1879a8a26b6b88149 Mon Sep 17 00:00:00 2001 From: tcr3dr Date: Thu, 4 Jun 2015 11:05:46 -0700 Subject: [PATCH] AP_Menu: Corrects string null comparison in AP_Menu. --- libraries/AP_Menu/AP_Menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Menu/AP_Menu.cpp b/libraries/AP_Menu/AP_Menu.cpp index 6085c62438..4bf6ca3b91 100644 --- a/libraries/AP_Menu/AP_Menu.cpp +++ b/libraries/AP_Menu/AP_Menu.cpp @@ -106,7 +106,7 @@ Menu::_run_command(bool prompt_on_enter) // XXX should an empty line by itself back out of the current menu? while (argc <= _args_max) { _argv[argc].str = strtok_r(NULL, " ", &s); - if ('\0' == _argv[argc].str) + if ('\0' == _argv[argc].str[0]) break; _argv[argc].i = atol(_argv[argc].str); _argv[argc].f = atof(_argv[argc].str); // calls strtod, > 700B !