Pārlūkot izejas kodu

2004-05-27 Sebastien Pouliot <[email protected]>

	* Queue.cs: Fixed case where we could still get Current after the last
	MoveNext.

svn path=/trunk/mcs/; revision=28268
Sebastien Pouliot 21 gadi atpakaļ
vecāks
revīzija
b5ab2d09bb

+ 5 - 0
mcs/class/corlib/System.Collections/ChangeLog

@@ -1,3 +1,8 @@
+2004-05-27  Sebastien Pouliot  <[email protected]>
+
+	* Queue.cs: Fixed case where we could still get Current after the last 
+	MoveNext.
+
 2004-05-26  Sebastien Pouliot  <[email protected]>
 
 	* ArrayList.cs: Fixed possible integer overflows.

+ 1 - 0
mcs/class/corlib/System.Collections/Queue.cs

@@ -328,6 +328,7 @@ namespace System.Collections {
 				}
 
 				if (current >= queue._size - 1) {
+					current = -1; // to late!
 					return false;
 				} else {
 					current++;