Well, FMath::Rand returns an int between 0 and RAND_MAX. So your j index is invalid. And when you use that j to look up into your Deck (whatever container that is), you are hitting an out of bounds error.
Well, FMath::Rand returns an int between 0 and RAND_MAX. So your j index is invalid. And when you use that j to look up into your Deck (whatever container that is), you are hitting an out of bounds error.