TiXmlString& operator=(const char *) exceptions on NULL
Brought to you by:
leethomason
TiXmlString's '=' operator (char*) will crash on NULL values. For example:
TiXmlString str;
str = NULL;
Since TiXmlString has its own 'null' representation, shouldn't this use that in this case? I.E.:
TiXmlString& operator = (const char * copy)
{
if(copy == NULL) // handle null string cases
{
clear();
return *this;
}
return assign( copy, (size_type)strlen(copy));
}
The two "TIXML_EXPLICIT TiXmlString (const char *)" ctors would also need this handling if this is indeed invalid behavior.
i am a new software developer .. i would like to work on this bug, so please assign it to me