2010-02-05 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Sat, 6 Feb 2010 09:02:58 +0000 (09:02 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 6 Feb 2010 09:02:58 +0000 (09:02 -0000)
* getline.cs (NextAvailable): Fix off-by-one error

svn path=/trunk/mcs/; revision=150975

mcs/tools/csharp/ChangeLog
mcs/tools/csharp/getline.cs

index 15d5e4351616f0767062cdb603441fdd37a8e50e..2ee1a7961970936f9d7caa0422da3e46f0fb12a9 100644 (file)
@@ -1,3 +1,7 @@
+2010-02-05  Miguel de Icaza  <miguel@novell.com>
+
+       * getline.cs (NextAvailable): Fix off-by-one error
+
 2010-02-04  Miguel de Icaza  <miguel@novell.com>
 
        * Take advantage of the Describe feature.
index d95ecdbbeb25877d86466994cfa899a0dc3bcc36..5426cca0ac26016cb6509413c71d41d2a1a70f92 100644 (file)
@@ -985,7 +985,7 @@ namespace Mono.Terminal {
                        public bool NextAvailable ()
                        {
                                int next = (cursor + 1) % history.Length;
-                               if (count == 0 || next > head)
+                               if (count == 0 || next >= head)
                                        return false;
 
                                return true;