mirror of
https://github.com/leethomason/tinyxml2.git
synced 2026-07-29 15:13:01 +04:00
Make SetText() behave like the docs say.
This commit is contained in:
+1
-1
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user