소스 검색

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 년 전
부모
커밋
b5ab2d09bb
2개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      mcs/class/corlib/System.Collections/ChangeLog
  2. 1 0
      mcs/class/corlib/System.Collections/Queue.cs

+ 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]>
 2004-05-26  Sebastien Pouliot  <[email protected]>
 
 
 	* ArrayList.cs: Fixed possible integer overflows.
 	* 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) {
 				if (current >= queue._size - 1) {
+					current = -1; // to late!
 					return false;
 					return false;
 				} else {
 				} else {
 					current++;
 					current++;