Skip to content

Commit 1a47ca5

Browse files
committed
add braces around else portion so can clearly see CMDLINE is cleared always
1 parent e3c5d68 commit 1a47ca5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shell/command.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,11 @@ void execute(char *first, char *rest, int lh_lf)
273273
env_nullStrings(0);
274274

275275
setErrorLevel(result);
276-
} else
276+
} else { /* not bat, exe, or com file */
277277
error_bad_command(first);
278+
}
279+
280+
/* clear CMDLINE once return from program execution so not still in environment */
278281
chgEnv( "CMDLINE", NULL );
279282
}
280283

0 commit comments

Comments
 (0)