diff mtctest/setup.c @ 245:5141e21596bb

themwi-test-mtc: fix ancient bug in From number setting
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 14 Aug 2023 22:23:27 -0800
parents 08d7794cdd0a
children 74dae755f85a
line wrap: on
line diff
--- a/mtctest/setup.c	Mon Aug 14 19:14:08 2023 -0800
+++ b/mtctest/setup.c	Mon Aug 14 22:23:27 2023 -0800
@@ -158,7 +158,7 @@
 			return;
 		if (!strncmp(arg, "ton=", 4)) {
 			arg += 4;
-			if (arg[0] >= '0' && arg[1] <= '7' && !isdigit(arg[1])){
+			if (arg[0] >= '0' && arg[0] <= '7' && !isdigit(arg[1])){
 				setup_msg.calling.type = *arg - '0';
 				arg++;
 			} else {
@@ -168,7 +168,7 @@
 			}
 		} else if (!strncmp(arg, "npi=", 4)) {
 			arg += 4;
-			if (arg[0] >= '0' && arg[1] <= '9' && !isdigit(arg[1])){
+			if (arg[0] >= '0' && arg[0] <= '9' && !isdigit(arg[1])){
 				setup_msg.calling.plan = *arg - '0';
 				arg++;
 			} else if (arg[0] == '1' && arg[1] >= '0' &&