diff --git a/mozilla/string/obsolete/nsString2.cpp b/mozilla/string/obsolete/nsString2.cpp index 72e0364b518..12fbce19122 100644 --- a/mozilla/string/obsolete/nsString2.cpp +++ b/mozilla/string/obsolete/nsString2.cpp @@ -756,7 +756,7 @@ PRInt32 GetNumericSubstring(nsString2& aString,PRUint32& aRadix) { else if((*cp>='A') && (*cp<='F')) { continue; } - else if((*cp>='-') || (*cp>='+')){ + else if((*cp=='-') || (*cp=='+')){ break; } else { @@ -794,13 +794,17 @@ PRInt32 nsString2::ToInteger(PRInt32* anErrorCode) const { ********************************************************************************/ //copy chars to local buffer -- step down from 2 bytes to 1 if necessary... - nsAutoString2 theString(*this,eOneByte); - PRUint32 theRadix=10; - PRInt32 result=GetNumericSubstring(theString,theRadix); + PRInt32 result=0; + if(0='A') && (*cp<='F')) { continue; } - else if((*cp>='-') || (*cp>='+')){ + else if((*cp=='-') || (*cp=='+')){ break; } else { @@ -794,13 +794,17 @@ PRInt32 nsString2::ToInteger(PRInt32* anErrorCode) const { ********************************************************************************/ //copy chars to local buffer -- step down from 2 bytes to 1 if necessary... - nsAutoString2 theString(*this,eOneByte); - PRUint32 theRadix=10; - PRInt32 result=GetNumericSubstring(theString,theRadix); + PRInt32 result=0; + if(0='A') && (*cp<='F')) { continue; } - else if((*cp>='-') || (*cp>='+')){ + else if((*cp=='-') || (*cp=='+')){ break; } else { @@ -794,13 +794,17 @@ PRInt32 nsString2::ToInteger(PRInt32* anErrorCode) const { ********************************************************************************/ //copy chars to local buffer -- step down from 2 bytes to 1 if necessary... - nsAutoString2 theString(*this,eOneByte); - PRUint32 theRadix=10; - PRInt32 result=GetNumericSubstring(theString,theRadix); + PRInt32 result=0; + if(0