Commit b9e78a66 authored by Dominik Charousset's avatar Dominik Charousset

Fix use of invalid iterator, close #1167

parent 8528ff22
...@@ -409,8 +409,9 @@ error actor_system_config::extract_config_file_path(string_list& args) { ...@@ -409,8 +409,9 @@ error actor_system_config::extract_config_file_path(string_list& args) {
if (i == args.end()) if (i == args.end())
return none; return none;
if (path.empty()) { if (path.empty()) {
auto str = std::move(*i);
args.erase(i); args.erase(i);
return make_error(pec::missing_argument, std::string{*i}); return make_error(pec::missing_argument, std::move(str));
} }
auto evalue = ptr->parse(path); auto evalue = ptr->parse(path);
if (!evalue) if (!evalue)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment