reenabled safer version of assertion

git-svn-id: svn://10.0.0.236/trunk@53516 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-11-15 17:10:06 +00:00
parent a22352015d
commit a321381b94
6 changed files with 42 additions and 84 deletions

View File

@@ -795,10 +795,8 @@ nsCString& nsCString::Assign(const PRUnichar* aString,PRInt32 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
#if 0
PRInt32 len=nsCRT::strlen(aString);
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in Assign(PRUnichar*)");
#endif
PRInt32 len=nsStr::FindChar(temp,0,PR_FALSE,0);
NS_WARN_IF_FALSE(kNotFound==len,"possible embedded null in Assign(PRUnichar*)");
#endif
}
@@ -905,10 +903,8 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
#if 0
PRInt32 len=strlen(aCString);
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in append(char*)");
#endif
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);
@@ -1094,10 +1090,8 @@ nsCString& nsCString::Insert(const char* aCString,PRUint32 anOffset,PRInt32 aCou
// 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
#if 0
PRInt32 len=strlen(aCString);
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in Insert(char*)");
#endif
PRInt32 len=nsStr::FindChar(temp,0,PR_FALSE,0);
NS_WARN_IF_FALSE(kNotFound==len,"possible embedded null in Insert(char*)");
#endif
}