diff --git a/mozilla/xpcom/string/src/nsTStringObsolete.cpp b/mozilla/xpcom/string/src/nsTStringObsolete.cpp index c1425a6ba07..6ee42d31140 100644 --- a/mozilla/xpcom/string/src/nsTStringObsolete.cpp +++ b/mozilla/xpcom/string/src/nsTStringObsolete.cpp @@ -193,6 +193,8 @@ nsTString_CharT::ToInteger( PRInt32* aErrorCode, PRUint32 aRadix ) const PRBool haveValue = PR_FALSE; while(cpstr; ++t) { + PRInt32 result = nsCAutoString(t->str).ToInteger(&rv, t->radix); + if (rv != t->rv || result != t->result) + return PR_FALSE; + } + return PR_TRUE; +} + //---- typedef PRBool (*TestFunc)(); @@ -936,6 +962,7 @@ tests[] = { "test_stringbuffer", test_stringbuffer }, { "test_voided", test_voided }, { "test_voided_autostr", test_voided_autostr }, + { "test_string_tointeger", test_string_tointeger }, { nsnull, nsnull } };