WIP for new string library, and defensive coding improvement in SetCapcity; r=buster
git-svn-id: svn://10.0.0.236/trunk@64014 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -204,10 +204,12 @@ void nsString::SetLength(PRUint32 anIndex) {
|
||||
* @return
|
||||
*/
|
||||
void nsString::SetCapacity(PRUint32 aLength) {
|
||||
if(aLength>mCapacity) {
|
||||
GrowCapacity(*this,aLength);
|
||||
if(aLength) {
|
||||
if(aLength>mCapacity) {
|
||||
GrowCapacity(*this,aLength);
|
||||
}
|
||||
AddNullTerminator(*this);
|
||||
}
|
||||
AddNullTerminator(*this);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
||||
Reference in New Issue
Block a user