1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 00:05:28 +03:00

CLI: improved zero length value check

This commit is contained in:
theArchLadder 2016-05-13 09:28:01 +02:00
parent 032b38d7f5
commit cf42943a11

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(strlen(eqptr) > 0 && strspn(eqptr, "0123456789.+-") == strlen(eqptr)) {
if(*eqptr != 0 && strspn(eqptr, "0123456789.+-") == strlen(eqptr)) {
int32_t value = 0;
float valuef = 0;