1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 22:35:19 +03:00

CLI: null values should give invalid value, not 0

This commit is contained in:
theArchLadder 2016-05-12 15:43:50 +02:00
parent d93abe9475
commit 032b38d7f5

View file

@ -2396,7 +2396,7 @@ static void cliSet(char *cmdline)
int_float_value_t tmp;
switch (valueTable[i].type & VALUE_MODE_MASK) {
case MODE_DIRECT: {
if(strspn(eqptr, "0123456789.+-") == strlen(eqptr)) {
if(strlen(eqptr) > 0 && strspn(eqptr, "0123456789.+-") == strlen(eqptr)) {
int32_t value = 0;
float valuef = 0;