Fix segfault if running wayvncctl with no args

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
pull/193/head
Jim Ramsay 2022-11-22 14:02:09 -05:00 committed by Andri Yngvason
parent 7491a319d5
commit 349693ed87
1 changed files with 2 additions and 0 deletions

View File

@ -127,6 +127,8 @@ int main(int argc, char* argv[])
}
}
argc -= optind;
if (argc <= 0)
return wayvncctl_usage(stderr, 1);
argv = &argv[optind];
ctl_client_debug_log(verbose);