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;
|
||||
if(luavalue_cast(-1, cnode)) {
|
||||
if(cnodeName.empty())
|
||||
node->setUnique(false);
|
||||
cnode->setUnique(false);
|
||||
else
|
||||
cnode->setTag(cnodeName);
|
||||
node->addChild(cnode);
|
||||
|
|
|
@ -38,7 +38,7 @@ std::string OTMLEmitter::emitNode(const OTMLNodePtr& node, int currentDepth)
|
|||
ss << node->tag();
|
||||
|
||||
// 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 << ":";
|
||||
} else
|
||||
ss << "-";
|
||||
|
|
Loading…
Reference in New Issue