From e546fa3d55f199e1810b1ad724beeb8f8b9747ba Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 10:14:54 +0900 Subject: accept only simple positive integers in commands, reverses last commit --- parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index 7794463..5ce7efe 100644 --- a/parser.c +++ b/parser.c @@ -1581,7 +1581,7 @@ static int process_int_param (char *parameter, int *value, int item_count, int * min_val = valid_nums[0]; max_val = valid_nums[item_count - 1]; - if (String_is_it_numeric(parameter)) { + if (String_is_it_pos_int(parameter)) { *value = atoi(parameter); int i; for (i = 0; (i < item_count) && (is_valid == 0); i++) { @@ -1612,7 +1612,7 @@ static int process_int_range (char *parameter, int *value, int min_val, int max_ int status; status = OK; - if (String_is_it_numeric(parameter)) { + if (String_is_it_pos_int(parameter)) { *value = atoi(parameter); if ((*valuemax_val)) { status = OutOfRange; -- cgit