[Mono-bugs] [Bug 475815] New: int.TryParse fails with very large numeric values.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 13 13:52:40 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=475815


           Summary: int.TryParse fails with very large numeric values.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.2.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dmitchell at logos.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1

Here's a log from the C# shell:

Mono C# Shell, type "help;" for help

Enter statements below.
csharp> using System.Globalization;
csharp> int foo = 0;
csharp> int.TryParse("2147483648", NumberStyles.None,
CultureInfo.InvariantCulture, out foo);
true
csharp> foo;
-2147483648
csharp> quit;
null

int.TryParse should have returned false in this case, and foo should have been
0.

Reproducible: Always

Steps to Reproduce:
1. Open the C# shell
2. Enter the statements provided in the details
Actual Results:  
int.TryParse returns true, and foo is set to -2147483648

Expected Results:  
int.TryParse returns false, and foo is set to 0

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list