Fixed "get returncode"

This commit is contained in:
Bandie 2018-03-19 20:45:49 +01:00
parent b23504d2d2
commit 3633803911
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD

View File

@ -153,9 +153,9 @@ int main(int argc, char *argv[]){
wait(&statval);
if(WIFEXITED(statval)){
if(verbose)
printf("Exit: %d\n", statval);
printf("Exit: %d\n", WEXITSTATUS(statval));
if(statval != returncode){
if(WEXITSTATUS(statval) != returncode){
char s[100];
sprintf(s, "Warning: %s returned something bad.", prog);
printf("%s\n", s);