Merge pull request #1745 from arnavb/fix-exit-code

Fallback exit code to 0 in case of overflow
This commit is contained in:
Jeong YunWon authored and GitHub committed 2020-02-05 13:48:44 +09:00
commit 3960fb8c07
1 file changed
+1 -1
+1 -1
View File
@@ -57,7 +57,7 @@ fn main() {
1 => match_class!(match args.as_slice()[0].clone() {
i @ PyInt => {
use num_traits::cast::ToPrimitive;
process::exit(i.as_bigint().to_i32().unwrap());
process::exit(i.as_bigint().to_i32().unwrap_or(0));
}
arg => {
if vm.is_none(&arg) {