Fix error in OTML casting from Lua, may fix #198
This commit is contained in:
parent
8b14a91ed9
commit
2fd8d4e580
|
@ -295,7 +295,7 @@ bool luavalue_cast(int index, OTMLNodePtr& node)
|
||||||
OTMLNodePtr cnode;
|
OTMLNodePtr cnode;
|
||||||
if(luavalue_cast(-1, cnode)) {
|
if(luavalue_cast(-1, cnode)) {
|
||||||
if(cnodeName.empty())
|
if(cnodeName.empty())
|
||||||
node->setUnique(false);
|
cnode->setUnique(false);
|
||||||
else
|
else
|
||||||
cnode->setTag(cnodeName);
|
cnode->setTag(cnodeName);
|
||||||
node->addChild(cnode);
|
node->addChild(cnode);
|
||||||
|
|
|
@ -38,7 +38,7 @@ std::string OTMLEmitter::emitNode(const OTMLNodePtr& node, int currentDepth)
|
||||||
ss << node->tag();
|
ss << node->tag();
|
||||||
|
|
||||||
// add ':' to if the node is unique or has value
|
// add ':' to if the node is unique or has value
|
||||||
if(node->hasValue() || node->isUnique() || node->isNull() || node->hasChildren())
|
if(node->hasValue() || node->isUnique() || node->isNull())
|
||||||
ss << ":";
|
ss << ":";
|
||||||
} else
|
} else
|
||||||
ss << "-";
|
ss << "-";
|
||||||
|
|
Loading…
Reference in New Issue