Fix parsing [] of JSONPath

This commit is contained in:
Wang Yuan 2021-10-21 19:40:35 +08:00 committed by GitHub
parent 94a6220f7c
commit 3f5a1ecf1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1538,7 +1538,7 @@ void Path::makePath(const String& path, const InArgs& in) {
index = index * 10 + ArrayIndex(*current - '0');
args_.push_back(index);
}
if (current == end || *++current != ']')
if (current == end || *current != ']')
invalidPath(path, int(current - path.c_str()));
} else if (*current == '%') {
addPathInArg(path, in, itInArg, PathArgument::kindKey);