diff --git a/core/app.cpp b/core/app.cpp index b0347fa429..7e8e577b32 100644 --- a/core/app.cpp +++ b/core/app.cpp @@ -1199,6 +1199,8 @@ void init(int cmdline_argc, const char *const *cmdline_argv) { } const std::vector get_options(const std::string &name) { + assert(!name.empty()); + assert(name[0] != '-'); std::vector matches; for (size_t i = 0; i < option.size(); ++i) { assert(option[i].opt);