summaryrefslogtreecommitdiff
path: root/src/bt-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bt-input.c')
-rw-r--r--src/bt-input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bt-input.c b/src/bt-input.c
index ab9e310..79cb27e 100644
--- a/src/bt-input.c
+++ b/src/bt-input.c
@@ -26,6 +26,7 @@
#endif
#include <stdlib.h>
+#include <string.h>
#include <glib.h>
#include "lib/bluez-dbus.h"
@@ -72,7 +73,7 @@ int main(int argc, char *argv[])
g_print("%s: %s\n", g_get_prgname(), error->message);
g_print("Try `%s --help` for more information.\n", g_get_prgname());
exit(EXIT_FAILURE);
- } else if (!connect_arg && !disconnect_arg) {
+ } else if ((!connect_arg || strlen(connect_arg) == 0) && (!disconnect_arg || strlen(disconnect_arg) == 0)) {
g_print("%s", g_option_context_get_help(context, FALSE, NULL));
exit(EXIT_FAILURE);
}