From 2fd8d4e580280e2377b3a30b324d70e830cb4132 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 17 Jan 2013 08:38:44 -0200 Subject: [PATCH] Fix error in OTML casting from Lua, may fix #198 --- src/framework/luaengine/luavaluecasts.cpp | 2 +- src/framework/otml/otmlemitter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/luaengine/luavaluecasts.cpp b/src/framework/luaengine/luavaluecasts.cpp index b696057f..db22ea74 100644 --- a/src/framework/luaengine/luavaluecasts.cpp +++ b/src/framework/luaengine/luavaluecasts.cpp @@ -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); diff --git a/src/framework/otml/otmlemitter.cpp b/src/framework/otml/otmlemitter.cpp index 6ac8ad17..4f08b89c 100644 --- a/src/framework/otml/otmlemitter.cpp +++ b/src/framework/otml/otmlemitter.cpp @@ -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 << "-";