Skip to content

Commit c44f04b

Browse files
committed
Fallback exit code to 0 in case of overflow
1 parent 3595f4e commit c44f04b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn main() {
5757
1 => match_class!(match args.as_slice()[0].clone() {
5858
i @ PyInt => {
5959
use num_traits::cast::ToPrimitive;
60-
process::exit(i.as_bigint().to_i32().unwrap());
60+
process::exit(i.as_bigint().to_i32().unwrap_or(0));
6161
}
6262
arg => {
6363
if vm.is_none(&arg) {

0 commit comments

Comments
 (0)