Project

Profile

Help

Bug #6562

closed

Casting XdmValue from parseJson to XdmMap causes casting problems in C++ for mapSize

Added by O'Neil Delpratt 11 days ago. Updated 10 days ago.

Status:
Resolved
Priority:
Normal
Category:
C++ API
Start date:
2024-10-17
Due date:
% Done:

100%

Estimated time:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Found in version:
Fixed in version:
SaxonC Languages:
All
SaxonC Platforms:
All
SaxonC Architecture:

Description

I noticed some strange casting issue of XdmValue to XdmMap via the parseJsonFromString method.

The map_size variable is corrupted in the class XdmMap.

See example:

XdmValue * signatureValue = parseJsonFromString(signature);
XdmItem * item = signatureValue->getHead();
if(item->isMap()) {
    XdmMap *xdmMap = (XdmMap *) item;
    int size = xdmMap->mapSize(); // problem here
}

Please register to edit this issue

Also available in: Atom PDF