[Mono-bugs] [Bug 78218][Maj] New - System.Console.In drops last character in the block

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Apr 27 04:39:49 EDT 2006


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 malekith at pld-linux.org.

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

--- shadow/78218	2006-04-27 04:39:49.000000000 -0400
+++ shadow/78218.tmp.7609	2006-04-27 04:39:49.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 78218
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: amd64 pld-linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: malekith at pld-linux.org               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Console.In drops last character in the block
+
+Description of Problem:
+
+I run into this when working with antlr scanners. It seems that Read method
+of Console.In drops the last character in buffer:
+
+
+Steps to reproduce the problem:
+1. compile:
+#v+
+using System;
+using System.IO;
+
+class M {
+  public static void Main ()
+  {
+    char[] buf = new char[16];
+        int c;
+        //TextReader input = new StreamReader ("t2");
+        TextReader input = Console.In;
+        do{
+          c = input.Read(buf,0,buf.Length);
+          for(int i=0;i<c;++i)
+            Console.Write(buf[i]);
+
+        }while(c == buf.Length);
+
+  }
+}
+#v-
+
+2. run:
+echo A brown fox jumpS over a lazy dog. | ./t.exe
+
+
+Actual Results:
+A brown fox jump over a lazy dog
+
+Expected Results:
+A brown fox jumpS over a lazy dog.
+
+How often does this happen? 
+always, it occured after 1.1.11. it was in Svn a few days ago, it is in
+1.1.14 and 1.1.15.
+
+It is not 64-bit specific.


More information about the mono-bugs mailing list