From aa40bfb7380f9de22ea2cb0040040e502e0863ee Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Apr 2022 16:06:53 +0100 Subject: [PATCH] Accept up to 4 digits when reading CPU numbers in config menu (issue #50). --- app/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config.c b/app/config.c index 4657205..8fe5406 100644 --- a/app/config.c +++ b/app/config.c @@ -635,7 +635,7 @@ static bool add_or_remove_cpu(bool add, int display_offset) { display_input_message(POP_R+16, "Enter CPU #"); - int n = read_value(POP_R+16, POP_LM+11, 2, 0); + int n = read_value(POP_R+16, POP_LM+11, 4, 0); if (n < 1 || n >= num_available_cpus) { display_error_message(POP_R+16, "Invalid CPU number"); return false; @@ -649,13 +649,13 @@ static bool add_or_remove_cpu(bool add, int display_offset) static bool add_cpu_range(int display_offset) { display_input_message(POP_R+16, "Enter first CPU #"); - int n1 = read_value(POP_R+16, POP_LM+17, 2, 0); + int n1 = read_value(POP_R+16, POP_LM+17, 4, 0); if (n1 < 1 || n1 >= num_available_cpus) { display_error_message(POP_R+16, "Invalid CPU number"); return false; } display_input_message(POP_R+16, "Enter last CPU #"); - int n2 = read_value(POP_R+16, POP_LM+16, 2, 0); + int n2 = read_value(POP_R+16, POP_LM+16, 4, 0); if (n2 < n1 || n2 >= num_available_cpus) { display_error_message(POP_R+16, "Invalid CPU range"); return false;