LOG("Sanity check name length - %i > %i", strlen(Name)+1, sizeof(child->Name));
if(strlen(Name) + 1 > sizeof(child->Name))
LOG("Sanity check name length - %i > %i", strlen(Name)+1, sizeof(child->Name));
if(strlen(Name) + 1 > sizeof(child->Name))
// Find last child, while we're at it, check for duplication
for( child = parent->Data.FirstChild; child; prev = child, child = child->Next )
{
if(strcmp(child->Name, Name) == 0) {
LOG("Duplicate");
// Find last child, while we're at it, check for duplication
for( child = parent->Data.FirstChild; child; prev = child, child = child->Next )
{
if(strcmp(child->Name, Name) == 0) {
LOG("Duplicate");