Skip to content

Commit

Permalink
expr: return "0" for |
Browse files Browse the repository at this point in the history
  • Loading branch information
Luv-Ray committed Oct 17, 2023
1 parent 8a67224 commit d325a95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/uu/expr/src/syntax_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,10 @@ fn infix_operator_or(values: &[String]) -> String {
assert!(values.len() == 2);
if value_as_bool(&values[0]) {
values[0].clone()
} else {
} else if value_as_bool(&values[1]) {
values[1].clone()
} else {
0.to_string()
}
}

Expand Down

0 comments on commit d325a95

Please sign in to comment.