int selected = fc_rand(count);
...
if (selected != count) is always true. That does not change the result (just sometimes we assign a thing to itself) but is redundant.
Considered adjusting the check to at least to work correctly (use 'count - 1') but went for complete removal in the end. That also allowed integrating previously separate 'count--'.
A bit undecided, but proposing this patch now anyway.
int selected = fc_rand(count); ... if (selected != count) is always true. That does not change the result (just sometimes we assign a thing to itself) but is redundant.