Fix error in OTML casting from Lua, may fix #198

This commit is contained in:
Eduardo Bart 2013-01-17 08:38:44 -02:00
parent 8b14a91ed9
commit 2fd8d4e580
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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 << "-";