X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/58f5f2e6ba6f33bc457e98ec883f2834c9a5fe6f..57dbb7df8973a3e0c0c570c1eae9d84802e02bd9:/viewer/view_properties.cpp?ds=inline diff --git a/viewer/view_properties.cpp b/viewer/view_properties.cpp index 8f92d5f..11498ba 100644 --- a/viewer/view_properties.cpp +++ b/viewer/view_properties.cpp @@ -113,8 +113,11 @@ void ViewProperties::ShowItem (BTreeData *data, BTreeNodeHeader &header) std::string ViewProperties::ToRaw (BTreeData *p) { std::stringstream ss; - uint size = p->Size (), i; - uchar *arr = p->ToArray (); + uint size = 0, i; + uchar *arr = NULL; + if (p->GetKey ()) { + arr = p->GetKey ()->ToRaw (size); + } for (i=0; i < size; i++) { if (isalnum (arr[i])) @@ -123,7 +126,14 @@ std::string ViewProperties::ToRaw (BTreeData *p) ss << "."; } - delete [] arr; + if (p->GetChild () != 0) { + ss << "("; + ss << p->GetChild (); + ss << ")"; + } + + if (arr) + delete [] arr; return ss.str (); }