diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 3d0cc2d3a..82e6bc27f 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -421,7 +421,7 @@ char** freerdp_command_line_parse_comma_separated_values(char* list, int* count) int index; int nCommas; - nArgs = nCommas = 0; + nCommas = 0; for (index = 0; list[index]; index++) nCommas += (list[index] == ',') ? 1 : 0; @@ -915,7 +915,11 @@ BOOL freerdp_client_detect_command_line(int argc, char** argv, DWORD* flags) *flags |= COMMAND_LINE_SIGIL_DASH | COMMAND_LINE_SIGIL_DOUBLE_DASH; *flags |= COMMAND_LINE_SIGIL_ENABLE_DISABLE; - if (windows_cli_count > posix_cli_count) + if (posix_cli_status <= COMMAND_LINE_STATUS_PRINT) + return compatibility; + + /* Check, if this may be windows style syntax... */ + if (windows_cli_count && (windows_cli_count >= posix_cli_count)) { *flags = COMMAND_LINE_SEPARATOR_COLON; *flags |= COMMAND_LINE_SIGIL_SLASH | COMMAND_LINE_SIGIL_PLUS_MINUS; @@ -1020,8 +1024,7 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin freerdp_client_command_line_pre_filter, freerdp_client_command_line_post_filter); } - - arg = CommandLineFindArgumentA(args, "v"); + CommandLineFindArgumentA(args, "v"); arg = args;