Bug fixes:

- DataTreeCore:
  - Incorrectly added new child to parent
- JSONparseCore:
  - Printed incomplete object (false error)
This commit is contained in:
Charl Wentzel
2018-11-20 12:59:21 +02:00
parent 6263c0f508
commit bd85621b40
2 changed files with 3 additions and 3 deletions

View File

@@ -260,7 +260,7 @@ CDataMember * CDataMember::GetChild( const char * Path, bool Create )
Child = &((*Child)->NextPeer);
}
if (!*Child && Create) {
*Child = new CDataMember( this, Key, KeyLen );
*Child = new CDataMember( Member, Key, KeyLen );
}
}

View File

@@ -757,7 +757,7 @@ bool CJSONparse::ParsePrimitive( CDataMember * Member )
bool CJSONparse::PrintString( char * String, int Len )
{
int BytesWritten;
int BytesWritten = 0;
// Start quote
if (write( OutputHandle, "\"", 1 ) < 0)
@@ -913,7 +913,7 @@ bool CJSONparse::PrintObject( CDataMember * Object, const int Indent )
if (write( OutputHandle, Spacer, SpacerLen ) < 0)
return false;
}
if (write( OutputHandle, "}", 1 ))
if (write( OutputHandle, "}", 1 ) < 0)
return false;
return true;
}