[Mono-bugs] [Bug 28660][Nor] New - Decimal multi-dimensional arrays cause NullRef Exception

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
7 Aug 2002 14:38:07 -0000


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 ndrochak@gol.com.

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

--- shadow/28660	Wed Aug  7 10:38:07 2002
+++ shadow/28660.tmp.22554	Wed Aug  7 10:38:07 2002
@@ -0,0 +1,62 @@
+Bug#: 28660
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndrochak@gol.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Decimal multi-dimensional arrays cause NullRef Exception
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+mono throws NullReferenceException with this sample code in Array:Address
+(int, int)
+
+Steps to reproduce the problem:
+Compile the following with csc and run with mono on linux.
+--------------------------------------------------
+using System;
+
+class Class1
+{
+	static int Main(string[] args)
+	{
+		decimal[,] dtab = { 
+			{1m, 0, 1m}
+		    };
+
+		    decimal d;
+		    
+		    for (int i = 0; i < dtab.GetLength(0); i++)
+		    {
+			d = Decimal.Round(dtab[i,0], (int)dtab[i,1]);
+			if (d != dtab[i,2]) 
+			{
+				return 1;
+			}
+		}
+		return 0;
+	}
+}
+--------------------------------------------------
+
+Actual Results:
+Exception thrown
+
+Expected Results:
+Run to completion
+
+How often does this happen? 
+every single time
+
+Additional Information: