Fixed 9.6 otb loading
This commit is contained in:
parent
03b8241bbc
commit
39db801f93
|
@ -163,6 +163,17 @@ std::string BinaryTree::getString()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string BinaryTree::getString(uint16 len)
|
||||||
|
{
|
||||||
|
unserialize();
|
||||||
|
if(m_pos+len > m_buffer.size())
|
||||||
|
stdext::throw_exception("BinaryTree: getString failed: string length exceeded buffer size.");
|
||||||
|
|
||||||
|
std::string ret((char *)&m_buffer[m_pos], len);
|
||||||
|
m_pos += len;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
Position BinaryTree::getPosition()
|
Position BinaryTree::getPosition()
|
||||||
{
|
{
|
||||||
Position ret;
|
Position ret;
|
||||||
|
|
|
@ -49,6 +49,7 @@ public:
|
||||||
uint32 getU32();
|
uint32 getU32();
|
||||||
uint64 getU64();
|
uint64 getU64();
|
||||||
std::string getString();
|
std::string getString();
|
||||||
|
std::string getString(uint16 len);
|
||||||
Position getPosition();
|
Position getPosition();
|
||||||
Point getPoint();
|
Point getPoint();
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ void ItemType::unserialize(const BinaryTreePtr& node)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ItemTypeAttrName: {
|
case ItemTypeAttrName: {
|
||||||
setName(node->getString());
|
setName(node->getString(len));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ItemTypeAttrDesc: {
|
case ItemTypeAttrDesc: {
|
||||||
|
|
Loading…
Reference in New Issue