Don't allocate a buffer when assigning a zero-length string, just call Truncate(

) instead (bug 328755).  r=darin.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@191369 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2006-02-28 05:35:12 +00:00
parent b46d5148a9
commit bf8f9059fc

View File

@@ -287,7 +287,7 @@ void
nsTSubstring_CharT::Assign( const char_type* data, size_type length )
{
// unfortunately, some callers pass null :-(
if (!data)
if (!data || length == 0)
{
Truncate();
return;