From 33271415fe42f0f8a340ae1d26b4a30b381c3e49 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 29 Nov 2017 14:13:50 +0100 Subject: [PATCH] Fixed /monitors argument checks. --- server/shadow/shadow_server.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/shadow/shadow_server.c b/server/shadow/shadow_server.c index 899bd3075..0f6872d88 100644 --- a/server/shadow/shadow_server.c +++ b/server/shadow/shadow_server.c @@ -360,11 +360,8 @@ int shadow_server_parse_command_line(rdpShadowServer* server, int argc, char** a /* Select monitors */ long val = strtol(arg->Value, NULL, 0); - if ((val < 0) || (errno != 0)) - index = 0; - - if (val >= numMonitors) - index = 0; + if ((val < 0) || (errno != 0) || (val >= numMonitors)) + status = COMMAND_LINE_STATUS_PRINT; server->selectedMonitor = val; }