mpy-cross: Allow specifying stdin as input without --.
This way, a bare `-` is never interpreted as an option, even before `--`. Filenames starting with `-` still need to be put after `--`. Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This commit is contained in:
parent
3164749b3d
commit
14374850ce
@ -243,7 +243,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
|
|||||||
|
|
||||||
// parse main options
|
// parse main options
|
||||||
for (int a = 1; a < argc; a++) {
|
for (int a = 1; a < argc; a++) {
|
||||||
if (option_parsing_active && argv[a][0] == '-') {
|
if (option_parsing_active && argv[a][0] == '-' && argv[a][1] != '\0') {
|
||||||
if (strcmp(argv[a], "-X") == 0) {
|
if (strcmp(argv[a], "-X") == 0) {
|
||||||
a += 1;
|
a += 1;
|
||||||
} else if (strcmp(argv[a], "--version") == 0) {
|
} else if (strcmp(argv[a], "--version") == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user