[Mono-bugs] [Bug 324019] Int32.Parse does not support trailing currency symbol

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 7 21:35:54 EST 2007


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

User kasliwal.iitr at gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=324019#c1


Piyush Kasliwal <kasliwal.iitr at gmail.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |kasliwal.iitr at gmail.com




--- Comment #1 from Piyush Kasliwal <kasliwal.iitr at gmail.com>  2007-12-07 19:35:52 MST ---
Index: class/corlib/System/Int32.cs
===================================================================
--- class/corlib/System/Int32.cs (revision 86999)
+++ class/corlib/System/Int32.cs (working copy)
@@ -494,6 +494,8 @@ 
      exc = GetFormatException ();
     return false;
    }
+   if (AllowTrailingWhite && pos < s.Length && !JumpOverWhite (ref pos, s,
false, tryParse, ref exc))
+    return false;

    if (AllowExponent) 
      FindExponent(ref pos, s);
@@ -514,7 +516,7 @@
     // Currency + sign
     FindCurrency (ref pos, s, nfi, ref foundCurrency);
     if (foundCurrency) {
-     if (AllowTrailingWhite && !JumpOverWhite (ref pos, s, true, tryParse, ref
exc)) 
+     if (AllowTrailingWhite && pos < s.Length && !JumpOverWhite (ref pos, s,
true, tryParse, ref exc))
       return false;
      if (!foundSign && AllowTrailingSign)
       FindSign (ref pos, s, nfi, ref foundSign, 


-- 
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