diff --git a/mozilla/base/src/nsString2.cpp b/mozilla/base/src/nsString2.cpp index 5d5ed3836b5..9263c5883f6 100644 --- a/mozilla/base/src/nsString2.cpp +++ b/mozilla/base/src/nsString2.cpp @@ -829,8 +829,8 @@ nsString2& nsString2::Append(const char* aCString,PRInt32 aCount) { nsStr temp; Initialize(temp,eOneByte); temp.mStr=(char*)aCString; - temp.mLength=nsCRT::strlen(aCString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aCString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this; @@ -848,8 +848,8 @@ nsString2& nsString2::Append(const PRUnichar* aString,PRInt32 aCount) { nsStr temp; Initialize(temp,eTwoByte); temp.mUStr=(PRUnichar*)aString; - temp.mLength=nsCRT::strlen(aString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this; diff --git a/mozilla/string/obsolete/nsString2.cpp b/mozilla/string/obsolete/nsString2.cpp index 5d5ed3836b5..9263c5883f6 100644 --- a/mozilla/string/obsolete/nsString2.cpp +++ b/mozilla/string/obsolete/nsString2.cpp @@ -829,8 +829,8 @@ nsString2& nsString2::Append(const char* aCString,PRInt32 aCount) { nsStr temp; Initialize(temp,eOneByte); temp.mStr=(char*)aCString; - temp.mLength=nsCRT::strlen(aCString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aCString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this; @@ -848,8 +848,8 @@ nsString2& nsString2::Append(const PRUnichar* aString,PRInt32 aCount) { nsStr temp; Initialize(temp,eTwoByte); temp.mUStr=(PRUnichar*)aString; - temp.mLength=nsCRT::strlen(aString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this; diff --git a/mozilla/xpcom/ds/nsString2.cpp b/mozilla/xpcom/ds/nsString2.cpp index 5d5ed3836b5..9263c5883f6 100644 --- a/mozilla/xpcom/ds/nsString2.cpp +++ b/mozilla/xpcom/ds/nsString2.cpp @@ -829,8 +829,8 @@ nsString2& nsString2::Append(const char* aCString,PRInt32 aCount) { nsStr temp; Initialize(temp,eOneByte); temp.mStr=(char*)aCString; - temp.mLength=nsCRT::strlen(aCString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aCString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this; @@ -848,8 +848,8 @@ nsString2& nsString2::Append(const PRUnichar* aString,PRInt32 aCount) { nsStr temp; Initialize(temp,eTwoByte); temp.mUStr=(PRUnichar*)aString; - temp.mLength=nsCRT::strlen(aString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this; diff --git a/mozilla/xpcom/string/obsolete/nsString2.cpp b/mozilla/xpcom/string/obsolete/nsString2.cpp index 5d5ed3836b5..9263c5883f6 100644 --- a/mozilla/xpcom/string/obsolete/nsString2.cpp +++ b/mozilla/xpcom/string/obsolete/nsString2.cpp @@ -829,8 +829,8 @@ nsString2& nsString2::Append(const char* aCString,PRInt32 aCount) { nsStr temp; Initialize(temp,eOneByte); temp.mStr=(char*)aCString; - temp.mLength=nsCRT::strlen(aCString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aCString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this; @@ -848,8 +848,8 @@ nsString2& nsString2::Append(const PRUnichar* aString,PRInt32 aCount) { nsStr temp; Initialize(temp,eTwoByte); temp.mUStr=(PRUnichar*)aString; - temp.mLength=nsCRT::strlen(aString); - if(-1==aCount) aCount=temp.mLength; + if(-1==aCount) aCount= nsCRT::strlen(aString); + temp.mLength = aCount; nsStr::Append(*this,temp,0,aCount,mAgent); } return *this;