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:
@@ -297,7 +297,9 @@ BString::operator=(const BString& string)
|
|||||||
BString&
|
BString&
|
||||||
BString::operator=(const char* string)
|
BString::operator=(const char* string)
|
||||||
{
|
{
|
||||||
if (string && string != String())
|
if (!string)
|
||||||
|
string = "";
|
||||||
|
if (string != String())
|
||||||
SetTo(string, strlen(string));
|
SetTo(string, strlen(string));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user