summaryrefslogtreecommitdiffstats
path: root/src/Structure.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Structure.cpp')
-rw-r--r--src/Structure.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Structure.cpp b/src/Structure.cpp
index 670cce6..b33de96 100644
--- a/src/Structure.cpp
+++ b/src/Structure.cpp
@@ -77,7 +77,7 @@ void Structure::UpdateNodeParent(Node* node)
77 if ( NULL != node->_parent ) 77 if ( NULL != node->_parent )
78 { 78 {
79 plist_type type = plist_get_node_type(node->_parent); 79 plist_type type = plist_get_node_type(node->_parent);
80 if (PLIST_ARRAY ==type || PLIST_DICT == type ) 80 if (PLIST_ARRAY == type || PLIST_DICT == type)
81 { 81 {
82 Structure* s = static_cast<Structure*>(node->_parent); 82 Structure* s = static_cast<Structure*>(node->_parent);
83 s->Remove(node); 83 s->Remove(node);
@@ -117,8 +117,14 @@ Structure* Structure::FromBin(const std::vector<char>& bin)
117 plist_from_bin(&bin[0], bin.size(), &root); 117 plist_from_bin(&bin[0], bin.size(), &root);
118 118
119 return ImportStruct(root); 119 return ImportStruct(root);
120}
121
122Structure* Structure::FromBin(const char* bin, uint64_t size)
123{
124 plist_t root = NULL;
125 plist_from_bin(bin, size, &root);
120 126
127 return ImportStruct(root);
121} 128}
122 129
123} // namespace PList 130} // namespace PList
124