diff options
Diffstat (limited to 'erts/etc/common')
-rw-r--r-- | erts/etc/common/dialyzer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/erts/etc/common/dialyzer.c b/erts/etc/common/dialyzer.c index 9c66be7f0f..4b4c1124f1 100644 --- a/erts/etc/common/dialyzer.c +++ b/erts/etc/common/dialyzer.c @@ -141,6 +141,7 @@ main(int argc, char** argv) int eargc_base; /* How many arguments in the base of eargv. */ char* emulator; char *env; + int i; int need_shell = 0; env = get_env("DIALYZER_EMULATOR"); @@ -167,9 +168,11 @@ main(int argc, char** argv) * Push initial arguments. */ - if (argc > 1 && strcmp(argv[1], "--wx") == 0) { - PUSH2("-smp", "--wx"); /* wx currently requires SMP enabled */ - argc--, argv++; + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "--wx") == 0) { + PUSH("-smp"); /* wx currently requires SMP enabled */ + break; + } } if (argc > 1 && strcmp(argv[1], "-smp") == 0) { |