diff --git a/src/Common/Parser.cpp b/src/Common/Parser.cpp index 24a46deb..5a86caf7 100644 --- a/src/Common/Parser.cpp +++ b/src/Common/Parser.cpp @@ -139,6 +139,10 @@ StrCaseMap Parser::parseArgs(const string &str, const char *pair_delim, const ch StrCaseMap ret; auto arg_vec = split(str, pair_delim); for (string &key_val : arg_vec) { + if (key_val.empty()) { + //忽略 + continue; + } auto key = trim(FindField(key_val.data(), NULL, key_delim)); if (!key.empty()) { auto val = trim(FindField(key_val.data(), key_delim, NULL));