From 8a603c5420d52e7cf6e3d03a67d1326e134d3a26 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Thu, 24 Feb 2022 22:44:37 +0100 Subject: [PATCH] bugfix --- core/src/command_args.h | 1 + core/src/core.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/command_args.h b/core/src/command_args.h index cc93423..9854cbe 100644 --- a/core/src/command_args.h +++ b/core/src/command_args.h @@ -24,6 +24,7 @@ public: alias = al; description = desc; type = CLI_ARG_TYPE_VOID; + bval = false; } CLIArg(char al, std::string desc, bool b) { diff --git a/core/src/core.cpp b/core/src/core.cpp index 8999874..d2fb7ce 100644 --- a/core/src/core.cpp +++ b/core/src/core.cpp @@ -66,10 +66,10 @@ int sdrpp_main(int argc, char* argv[]) { // Define command line options and parse arguments core::args.defineAll(); - core::args.parse(argc, argv); + if (core::args.parse(argc, argv) < 0) { return -1; } // Show help and exit if requested - if ((bool)core::args["help"]) { + if (core::args["help"].b()) { core::args.showHelp(); return 0; }