Skip to content
Snippets Groups Projects
Unverified Commit f9c3b8dc authored by RadsammyT's avatar RadsammyT
Browse files

PR#3 review: -l's arg is now optional

parent 1ed34b1e
No related branches found
No related tags found
No related merge requests found
...@@ -234,7 +234,7 @@ int main(int argc, char** argv) { ...@@ -234,7 +234,7 @@ int main(int argc, char** argv) {
{"fullscreen", no_argument, 0, 'f'}, {"fullscreen", no_argument, 0, 'f'},
{"help", no_argument, 0, 'h'}, {"help", no_argument, 0, 'h'},
{"game", required_argument, 0, 'g'}, {"game", required_argument, 0, 'g'},
{"applet-params", required_argument, 0, 'l'}, {"applet-params", optional_argument, 0, 'l'},
{"multiplayer", required_argument, 0, 'm'}, {"multiplayer", required_argument, 0, 'm'},
{"program", optional_argument, 0, 'p'}, {"program", optional_argument, 0, 'p'},
{"user", required_argument, 0, 'u'}, {"user", required_argument, 0, 'u'},
...@@ -244,7 +244,7 @@ int main(int argc, char** argv) { ...@@ -244,7 +244,7 @@ int main(int argc, char** argv) {
}; };
while (optind < argc) { while (optind < argc) {
int arg = getopt_long(argc, argv, "g:fhvp::c:u:l:", long_options, &option_index); int arg = getopt_long(argc, argv, "g:fhvp::c:u:l::", long_options, &option_index);
if (arg != -1) { if (arg != -1) {
switch (static_cast<char>(arg)) { switch (static_cast<char>(arg)) {
case 'c': case 'c':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment