diff --git a/system.c b/system.c index 9079820..b8e2f6b 100644 --- a/system.c +++ b/system.c @@ -190,7 +190,7 @@ uint8_t system_execute_line(char *line) } } else { // Store global setting. if(!read_float(line, &char_counter, &value)) { return(STATUS_BAD_NUMBER_FORMAT); } - if(line[char_counter] != 0) { return(STATUS_INVALID_STATEMENT); } + if((line[char_counter] != 0) || (parameter > 255)) { return(STATUS_INVALID_STATEMENT); } return(settings_store_global_setting((uint8_t)parameter, value)); } }