From c2eac3297c1110feafeed96ad5d5b4fcb9cfc5d0 Mon Sep 17 00:00:00 2001 From: antao Date: Wed, 26 Jun 2019 17:58:25 +0800 Subject: [PATCH] Fix a bug of the drogon_ctl command --- drogon_ctl/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drogon_ctl/main.cc b/drogon_ctl/main.cc index 6aefc5cc..d067b385 100755 --- a/drogon_ctl/main.cc +++ b/drogon_ctl/main.cc @@ -31,8 +31,9 @@ int main(int argc, char *argv[]) { args.push_back(argv[i]); } - for (auto &arg : args) + if (args.size() > 0) { + auto &arg = args[0]; if (arg == "-h" || arg == "--help") { arg = "help";