[Bug] fix get_parsed_paths() subscript out of range (#4585)

This commit is contained in:
HuangWei
2020-09-12 16:04:21 +08:00
committed by GitHub
parent e26d5d0da0
commit 4caa6f9b33

View File

@ -371,6 +371,9 @@ void JsonFunctions::parse_json_paths(
void JsonFunctions::get_parsed_paths(
const std::vector<std::string>& path_exprs,
std::vector<JsonPath>* parsed_paths) {
if(path_exprs.empty()){
return;
}
if (path_exprs[0] != "$") {
parsed_paths->emplace_back("", -1, false);