0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Filter: fixed error-checking bug in !~ operator

This commit is contained in:
Maria Matejka 2019-03-23 13:32:14 +01:00
parent 7078aa63ae
commit fe503c7c06
2 changed files with 2 additions and 1 deletions

View File

@ -233,7 +233,7 @@
ARG_ANY(1);
ARG_ANY(2);
int i = val_in_range(&v1, &v2);
if (res.val.i == F_CMP_ERROR)
if (i == F_CMP_ERROR)
runtime( "!~ applied on unknown type pair" );
RESULT(T_BOOL, i, !i);
}

View File

@ -136,6 +136,7 @@ int set is;
bt_assert(2 ~ [ 1, 2, 3 ]);
bt_assert(5 ~ [ 4 .. 7 ]);
bt_assert(1 !~ [ 2, 3, 4 ]);
bt_assert(999 !~ [ 666, 333 ]);
is = [ 2, 3, 4, 7..11 ];
bt_assert(10 ~ is);