Why is this Do/While loop hanging Unity?

Hey folks. Hoping some fresh eyes will spot the issue here. Following code hangs Unity:

private void AssignPairs()
    {
        int currentNumberOfPairs = currentBoardSettings._posTargetsArraySize / 2;   // All the board sizes are even numbers, so can be halved to find current number of pairs
        currentPairTags     = new PairTypeTag[currentNumberOfPairs];                // Create a new array to contain this round's legitimate tags
        
        for (int i = 0; i < currentPairTags.Length; i++)
        { // Initialise the array of legitimate tags this round to EMPTY00 - blank
            currentPairTags *= PairTypeTag.EMPTY00;*

}

for(int i = 0; i < currentPairTags.Length; i++)
{ // Iterate through the legit tag slots…
if(currentPairTags == PairTypeTag.EMPTY00)
{//… until you find a slot marked empty.
bool uniqueTag = false; // Create a flag for the while loop, initialised to false;

do // While the flag is false, loop…
{
Debug.Log(“Choosing candidate…”);
PairTypeTag candidatePairTag = (PairTypeTag)Random.Range(1, 15); // Choose a random tag from all the enums, excluding EMPTY00
Debug.Log(“Looking through current pair slots…”);
// uniqueTag = true;
for (int foo = 0; foo < currentPairTags.Length; i++)
{ // Look through the array of legit tags…
if (candidatePairTag != currentPairTags[foo]) // If the candidate and the current legitTagSlot are NOT the same…
{
currentPairTags[foo] = candidatePairTag; // …assign the tag to the current legitTagSlot…
uniqueTag = true; // …and mark the uniqueTag as true, so we don’t have to loop again, hopefully not locking up.
}
else
{
Debug.Log(“Failed to select pair list”);
uniqueTag = true;
}
}
uniqueTag = true;
} while (uniqueTag == false);
Debug.Log(“Holy shit, we got out of that While loop!”);
}
}
I’m trying to randomly select a few enums and enter them into an array, then use this array as a source list to assign pairs of enums (0-15) to cards - basically I’m creating a [Concentration][1] game.
However, I cannot seem to stop my While and/or Do/While loops from hanging Unity! The quoted code sets uniqueTag to true no matter the outcome of the for loops (a test) and STILL the damned thing hangs.
Anybody see what I’m not seeing?
–Rev
[1]: Concentration (card game) - Wikipedia

In your last for loop you are incrementing the wrong value. Instead of I++, write foo++, or you getting an infinite loop.