changes to fix some errors constructing autostrings from null pointers that led to crashes
git-svn-id: svn://10.0.0.236/trunk@69730 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1881,6 +1881,12 @@ nsCAutoString::nsCAutoString( const nsCString& aString ) : nsCString(){
|
||||
}
|
||||
|
||||
|
||||
nsCAutoString::nsCAutoString(const char* aCString) : nsCString() {
|
||||
Initialize(*this,mBuffer,sizeof(mBuffer)-1,0,eOneByte,PR_FALSE);
|
||||
AddNullTerminator(*this);
|
||||
Append(aCString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy construct from ascii c-string
|
||||
* @param aCString is a ptr to a 1-byte cstr
|
||||
|
||||
Reference in New Issue
Block a user