summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-23 18:02:28 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-06-23 18:02:43 +0200
commit140b20afd4a688eddbba9855a5f27192a61ad203 (patch)
tree4991ee2141407378c87ae3046e0545944f086d64
parentd43b7c86b8fe7e5ef47a78becbca46b121d33d40 (diff)
fixed --gui cmdline option
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index e35db87a..67f5ce6a 100644
--- a/main.c
+++ b/main.c
@@ -862,6 +862,10 @@ main (int argc, char *argv[]) {
return 0;
}
else if (!strcmp (argv[i], "--gui")) {
+ if (i == argc-1) {
+ break;
+ }
+ i++;
strncpy (use_gui_plugin, argv[i], sizeof(use_gui_plugin) - 1);
use_gui_plugin[sizeof(use_gui_plugin) - 1] = 0;
}