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

User [email protected] added comment
https://bugzilla.novell.com/show_bug.cgi?id=399389#c1


Gonzalo Paniagua Javier <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]




--- Comment #1 from Gonzalo Paniagua Javier <[email protected]>  2009-02-10 
15:28:43 MST ---
Fixing this with the following patch breaks 7 tests in corlib... I don't know
if those pass on windows...


Index: DateTime.cs
===================================================================
--- DateTime.cs    (revision 126520)
+++ DateTime.cs    (working copy)
@@ -575,12 +575,12 @@

         public DateTime AddMilliseconds (double value)
         {
-            if ((value * TimeSpan.TicksPerMillisecond) > long.MaxValue ||
-                    (value * TimeSpan.TicksPerMillisecond) < long.MinValue) {
+            value = Math.Round (value);
+            double v2 = value * TimeSpan.TicksPerMillisecond;
+            if (v2 > long.MaxValue || v2 < long.MinValue)
                 throw new ArgumentOutOfRangeException();
-            }
-            long msticks = (long) (value * TimeSpan.TicksPerMillisecond);

+            long msticks = (long) v2;
             return AddTicks (msticks);
         }

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to