Disable the temporary assertion for embedded NUL characters in nsString::Append(),

so that clients of nsString can make use of the changes that rickg added which
allow embedded NULs.  r: rickg
This commit is contained in:
fur%netscape.com 1999-11-29 21:32:53 +00:00
parent 7d61e2c568
commit 4981f629c1
3 changed files with 0 additions and 24 deletions

View File

@ -906,14 +906,6 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
if(0<aCount) {
temp.mLength=aCount;
// If this assertion fires, the caller is probably lying about the length of
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
PRInt32 len=nsStr::FindChar(temp,0,PR_FALSE,0);
NS_WARN_IF_FALSE(kNotFound==len,"possible embedded null in append(char*)");
#endif
}
else aCount=temp.mLength=nsCRT::strlen(aCString);

View File

@ -906,14 +906,6 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
if(0<aCount) {
temp.mLength=aCount;
// If this assertion fires, the caller is probably lying about the length of
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
PRInt32 len=nsStr::FindChar(temp,0,PR_FALSE,0);
NS_WARN_IF_FALSE(kNotFound==len,"possible embedded null in append(char*)");
#endif
}
else aCount=temp.mLength=nsCRT::strlen(aCString);

View File

@ -906,14 +906,6 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
if(0<aCount) {
temp.mLength=aCount;
// If this assertion fires, the caller is probably lying about the length of
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
PRInt32 len=nsStr::FindChar(temp,0,PR_FALSE,0);
NS_WARN_IF_FALSE(kNotFound==len,"possible embedded null in append(char*)");
#endif
}
else aCount=temp.mLength=nsCRT::strlen(aCString);