Fixed an ugly bug in the IndexOf() method; achieved 100% test coverage for the deque code so far

git-svn-id: file:///srv/devel/repo-conversion/nusu@162 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2009-07-13 21:17:09 +00:00
parent 7885e86836
commit a817f52406
2 changed files with 73 additions and 4 deletions

View file

@ -110,7 +110,7 @@ namespace Nuclex.Support.Collections {
int lastBlock = this.blocks.Count - 1;
for(int tempIndex = 1; tempIndex < lastBlock; ++tempIndex) {
index = Array.IndexOf<ItemType>(
this.blocks[1], item, 0, this.blockSize
this.blocks[tempIndex], item, 0, this.blockSize
);
if(index != -1) {
return (index - this.firstBlockStartIndex + tempIndex * this.blockSize);