зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
99e6fc82e3
Коммит
24ae60dea8
|
@ -906,14 +906,6 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
|
||||||
|
|
||||||
if(0<aCount) {
|
if(0<aCount) {
|
||||||
temp.mLength=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);
|
else aCount=temp.mLength=nsCRT::strlen(aCString);
|
||||||
|
|
||||||
|
|
|
@ -906,14 +906,6 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
|
||||||
|
|
||||||
if(0<aCount) {
|
if(0<aCount) {
|
||||||
temp.mLength=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);
|
else aCount=temp.mLength=nsCRT::strlen(aCString);
|
||||||
|
|
||||||
|
|
|
@ -906,14 +906,6 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
|
||||||
|
|
||||||
if(0<aCount) {
|
if(0<aCount) {
|
||||||
temp.mLength=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);
|
else aCount=temp.mLength=nsCRT::strlen(aCString);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче