From 3f5a1ecf1deb088d5090e2ae63b84f90ff7e8811 Mon Sep 17 00:00:00 2001 From: Wang Yuan Date: Thu, 21 Oct 2021 19:40:35 +0800 Subject: [PATCH] Fix parsing `[]` of JSONPath --- src/lib_json/json_value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index aa2b744..562a7bc 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -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);