1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

expr: return "0" for |

This commit is contained in:
Zhuoxun Yang 2023-10-17 22:27:47 +08:00
parent 8a67224917
commit d325a952ee

View file

@ -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()
}
}