mirror of https://github.com/AxioDL/tinyxml2.git
Make SetText() behave like the docs say.
This commit is contained in:
parent
85fff5e50a
commit
869bb599c1
|
@ -1262,7 +1262,7 @@ const char* XMLElement::GetText() const
|
|||
|
||||
void XMLElement::SetText( const char* inText )
|
||||
{
|
||||
if ( FirstChild() )
|
||||
if ( FirstChild() && FirstChild()->ToText() )
|
||||
FirstChild()->SetValue( inText );
|
||||
else {
|
||||
XMLText* theText = GetDocument()->NewText( inText );
|
||||
|
|
Loading…
Reference in New Issue