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 [EMAIL PROTECTED]

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

--- shadow/77544        2006-02-13 13:10:26.000000000 -0500
+++ shadow/77544.tmp.1025       2006-02-13 13:10:26.000000000 -0500
@@ -0,0 +1,58 @@
+Bug#: 77544
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Windows XP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.ArraySegment "out of bounds"
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+
+Description of Problem:
+
+System.ArraySegment constructor incorrectly says bounds are out of range,
+when they are not.
+
+
+Steps to reproduce the problem:
+
+The following code snippet reproduces it everytime.
+
+byte[] tmp = new byte[4096];
+ArraySegment<byte> seg = new ArraySegment<byte>(tmp, 0, tmp.Length);
+Console.WriteLine("seg.off: " + seg.Offset + ", " + seg.Count);
+Console.ReadLine();
+
+However, the omitting the explicit bounds *does not* have this problem.
+
+byte[] tmp = new byte[4096];
+ArraySegment<byte> seg = new ArraySegment<byte>(tmp); //no explicit bounds
+Console.WriteLine("seg.off: " + seg.Offset + ", " + seg.Count);
+Console.ReadLine();
+
+
+Actual Results:
+"System.ArgumentException: out of bounds" in System.ArraySegment constructor
+
+
+Expected Results:
+Console output should be: "seg.off: 0, 4096"
+
+
+How often does this happen? 
+
+Everytime.
+
+
+Additional Information:
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to