Fix repeated permutations index advancement
This commit is contained in:
1 parent
f158e24247
commit
5228c9e6a2
2 files changed
+11
-1
No files matched your search
@@ -106,7 +106,7 @@ public static class EnumerableExtensions
|
||||
var idx = count - 1;
|
||||
for(;idx > 0; --idx)
|
||||
{
|
||||
var isIndexBelowMax = indices[idx] != idx + pool.Length - count;
|
||||
var isIndexBelowMax = indices[idx] < pool.Length - 1;
|
||||
if (isIndexBelowMax)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user