mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Merge pull request #1745 from arnavb/fix-exit-code
Fallback exit code to 0 in case of overflow
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user