Skip to content

Commit 3dad856

Browse files
committed
Fix bug.
1 parent bd5ef18 commit 3dad856

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

jsquery_extract.c

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy