When BString assignment operator is called with a NULL argument we should use an empty string instead. I checked this against Dano.
This fixed #4713 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34983 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9b79c5cc28
commit
534bebec39
@ -297,7 +297,9 @@ BString::operator=(const BString& string)
|
||||
BString&
|
||||
BString::operator=(const char* string)
|
||||
{
|
||||
if (string && string != String())
|
||||
if (!string)
|
||||
string = "";
|
||||
if (string != String())
|
||||
SetTo(string, strlen(string));
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user