summaryrefslogtreecommitdiff
path: root/src/cli_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli_new.c')
-rw-r--r--src/cli_new.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cli_new.c b/src/cli_new.c
index c4d1b86..b2d6e1d 100644
--- a/src/cli_new.c
+++ b/src/cli_new.c
@@ -926,7 +926,15 @@ boolean val_cmp(const valstruct *left, const valstruct *right, vtw_cond_e cond)
rval = right->val;
else
rval = right->vals[rcur];
-
+
+ //don't bother comparing if these are different types.
+ if ((rcur || right->cnt)
+ && right->val_types[rcur] != NULL) {
+ if (right->val_types[rcur] != val_type) {
+ continue;
+ }
+ }
+
parts_num = 0;
switch (val_type) {
case IPV6_TYPE: