1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 09:20:38 +00:00

Fixed the SHELL() function to return correct values on Linux (and presumably OSX).

This commit is contained in:
Luke Ceddia 2015-12-11 13:02:44 +11:00
parent c98a4529f6
commit 9595dd37e6

View file

@ -18208,8 +18208,7 @@ int64 func_shell(qbs *str){
if (new_error) return 1;
if (cloud_app){error(262); return 1;}
static int64 return_code;
return_code=0;
int64 return_code;
//exit full screen mode if necessary
static int32 full_screen_mode;
@ -18440,6 +18439,10 @@ int64 func_shell(qbs *str){
shell_call_in_progress=1;
return_code = system((char*)strz->chr);
shell_call_in_progress=0;
if (return_code == -1) {/* do nothing */}
else {
return_code = WEXITSTATUS(return_code);
}
#endif
@ -33188,4 +33191,4 @@ sub__limit( 10 );
sub__display();
}while(1);
//infinite loop (this function never exits)
}
}