From 54c0facdce81d0e0e1b45af60898c37a29cbae1f Mon Sep 17 00:00:00 2001 From: Gavin Howard Date: Wed, 10 Jun 2020 23:42:20 -0600 Subject: [PATCH] Add another fix for the parse bug and a test --- src/bc/parse.c | 1 + tests/bc/errors.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/bc/parse.c b/src/bc/parse.c index 01f5fd98..6e553199 100644 --- a/src/bc/parse.c +++ b/src/bc/parse.c @@ -1332,6 +1332,7 @@ static BcParseStatus bc_parse_expr_err(BcParse *p, uint8_t flags, flags & ~BC_PARSE_NOCALL); rprn = (prev == BC_INST_CALL); nexprs += 1; + flags &= ~(BC_PARSE_ARRAY); break; } diff --git a/tests/bc/errors.txt b/tests/bc/errors.txt index 7977a8c8..bb1d033f 100644 --- a/tests/bc/errors.txt +++ b/tests/bc/errors.txt @@ -233,6 +233,7 @@ bytes(1) + 4 4e-4.2 a[2^63] = 1 ibase = 100 +length(l[] + i[]) length("string") abs("string") abs(a[])