Skip to content

Commit

Permalink
Fix connect when right part is undefined variable (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Apr 17, 2024
1 parent 6e26c4b commit d597f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/be_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ static void sub_expr(bparser *parser, bexpdesc *e, int prio)
}
init_exp(&e2, ETVOID, 0);
sub_expr(parser, &e2, binary_op_prio(op)); /* parse right side */
if ((e2.type == ETVOID) && (op == OptConnect)) {
if ((op == OptConnect) && (e2.type == ETVOID) && (e2.v.s == NULL)) { /* 'e2.v.s == NULL' checks that it's not an undefined variable */
init_exp(&e2, ETINT, M_IMAX);
} else {
check_var(parser, &e2); /* check if valid */
Expand Down

0 comments on commit d597f8b

Please sign in to comment.