Skip to content

Commit 85ed5f3

Browse files
committed
Fix decoding bug while implementing CurrInputValue
I added this fragment in a later commit, forgot to test it. Unfortunately, it had some copy-paste error
1 parent c6dfc12 commit 85ed5f3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/extensions/arith.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,7 @@ impl Expr {
476476
} else if let Some(&[Tk::CurrInp, Tk::InpValue, Tk::Num(1), Tk::Equal, Tk::Verify]) =
477477
tks.get(e.checked_sub(5)?..e)
478478
{
479-
let (x, end_pos) = Self::from_tokens(tokens, e - 5)?;
480-
let expr = Expr::from_inner(ExprInner::Negate(Box::new(x)));
481-
Some((expr, end_pos))
479+
Some((Expr::from_inner(ExprInner::CurrInputIdx), e - 5))
482480
} else if let Some(&[Tk::Div64, Tk::Num(1), Tk::Equal, Tk::Verify, Tk::Nip]) =
483481
tks.get(e.checked_sub(5)?..e)
484482
{
@@ -1064,6 +1062,7 @@ mod tests {
10641062

10651063
#[test]
10661064
fn arith_parse() {
1065+
_arith_parse("num64_gt(curr_inp_v,mul(1,out_v(0)))");
10671066
// This does not test the evaluation
10681067
_arith_parse("num64_eq(8,8)");
10691068
_arith_parse("num64_gt(9223372036854775807,9223372036854775806)"); // 2**63-1

0 commit comments

Comments
 (0)