Skip to content

Commit

Permalink
Fix #151
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffany352 committed Nov 23, 2023
1 parent f64cb2c commit 2c49c5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/output/reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ impl ExprReply {
Expr::UnaryOp(ref unaryop) => match unaryop.op {
UnaryOpType::Positive => {
literal!("+");
recurse(expr, parts, Precedence::Plus)
recurse(&unaryop.expr, parts, Precedence::Plus)
}
UnaryOpType::Negative => {
literal!("-");
recurse(expr, parts, Precedence::Plus)
recurse(&unaryop.expr, parts, Precedence::Plus)
}
UnaryOpType::Degree(ref suffix) => {
if prec < Precedence::Mul {
Expand Down
6 changes: 6 additions & 0 deletions core/tests/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,3 +697,9 @@ fn quantity_defs() {
"Definition: energy = physical quantity for force length (kg m^2 / s^2)",
);
}

#[test]
fn test_tim() {
// Issue #151, rink crashing due to stack overflow
test("Tim", "Definition: Tim = 12^-4 hour = 3125/18, approx. 173.6111 millisecond (time; s)");
}

0 comments on commit 2c49c5f

Please sign in to comment.