Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3dad856

Browse filesBrowse files
committed
Fix bug.
1 parent bd5ef18 commit 3dad856
Copy full SHA for 3dad856

File tree

1 file changed

+11
-1
lines changed
Filter options

1 file changed

+11
-1
lines changed

‎jsquery_extract.c

Copy file name to clipboardExpand all lines: jsquery_extract.c
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,23 @@ recursiveExtract(char *jqBase, int32 jqPos, bool indirect, PathItem *path)
140140
result->args.items = (ExtractedNode **)palloc(nelems * sizeof(ExtractedNode *));
141141
result->args.count = 0;
142142
result->path = path;
143+
if (type == jqiContains || type == jqiOverlap)
144+
{
145+
pathItem = (PathItem *)palloc(sizeof(PathItem));
146+
pathItem->type = iAnyArray;
147+
pathItem->parent = path;
148+
}
149+
else
150+
{
151+
pathItem = path;
152+
}
143153
for (i = 0; i < nelems; i++)
144154
{
145155
ExtractedNode *item;
146156
item = (ExtractedNode *)palloc(sizeof(ExtractedNode));
147157
item->indirect = false;
148158
item->type = eScalar;
149-
item->path = path;
159+
item->path = pathItem;
150160
arg = readJsQueryHeader(jqBase, arrayPos[i], &childType, &nextPos);
151161
item->bounds.inequality = false;
152162
item->bounds.exact = (JsQueryValue *)palloc(sizeof(JsQueryValue));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.