[Mono-bugs] [Bug 41297][Min] Changed - unsafe decimal looses its sign

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 29 Mar 2004 10:55:24 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lluis@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=41297

--- shadow/41297	2003-04-16 12:53:02.000000000 -0400
+++ shadow/41297.tmp.25769	2004-03-29 10:55:24.000000000 -0500
@@ -1,13 +1,13 @@
 Bug#: 41297
-Product: Mono/Class Libraries
+Product: Mono: Class Libraries
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: REOPENED   
-Resolution: 
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Minor
 Component: System
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: vi64pa@kolumbus.fi               
 QAContact: mono-bugs@ximian.com
@@ -101,6 +101,24 @@
 			else
 				ret_ptr2 [i] = ret_ptr [i];
 		}
 	}
 	Console.WriteLine (d2);
 }
+
+------- Additional Comments From lluis@ximian.com  2004-03-29 10:55 -------
+This is a bug in MS.NET. The formatting method is not interpreting
+properly the value 86 in the sign byte.
+
+To see it, change the last line of the test to:
+
+	Console.WriteLine (d2 + 0);
+
+You'll see that now it prints 18295873486192640 instead of
+-18295873486192640. The + operation probably cleans the decimal
+representation. Notice also that if you do:
+
+	Console.WriteLine (d2 - 18295873486192640);
+
+it prints 0, so d2 is actually positive.
+
+