diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2008-12-25 11:55:27 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2008-12-25 11:55:27 +0100 |
commit | 083c43e22efb5353a258827a9e6f2f995cfe822d (patch) | |
tree | e63fafb2dbc57bcf120234e96e48ea755502f546 /filter/filter.c | |
parent | 165a62272720071ca5e9ed1badfddc78b7a7af10 (diff) | |
download | bird-083c43e22efb5353a258827a9e6f2f995cfe822d.tar bird-083c43e22efb5353a258827a9e6f2f995cfe822d.zip |
fixes some 64-bit related bugs.
Filter code used 'aux' integer field of 'symbol' struct to store ptr
to next symbol and both 'aux2' and 'def' fields for value.
Changed to just 'def' for value and 'aux2' for ptr to next symbol.
Also another minor bugfix.
Diffstat (limited to 'filter/filter.c')
-rw-r--r-- | filter/filter.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/filter/filter.c b/filter/filter.c index 6288df7..109c7de 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -437,16 +437,23 @@ interpret(struct f_inst *what) case T_PATH_MASK: if (sym->class != (SYM_VARIABLE | v2.type)) runtime( "Assigning to variable of incompatible type" ); - * (struct f_val *) sym->aux2 = v2; + * (struct f_val *) sym->def = v2; break; default: bug( "Set to invalid type" ); } break; - case 'c': /* integer (or simple type) constant */ + /* some constants have value in a2, some in *a1.p, strange. */ + case 'c': /* integer (or simple type) constant, or string, or set */ res.type = what->aux; - res.val.i = what->a2.i; + + if (res.type == T_SET) + res.val.t = what->a2.p; + else if (res.type == T_STRING) + res.val.s = what->a2.p; + else + res.val.i = what->a2.i; break; case 'C': res = * ((struct f_val *) what->a1.p); |