This is slightly different that the fisher_yates_shuffle algorithm.
At the root of the matter, rand() is not random and has a odd,even,odd,even bias - or at least common implementations do. There are better "pseudo random number generators" than rand(). They are much more computationally expensive and I think outside of the scope of this thread.
Well, I may not agree here. "Buggy" if it messes some elements in the deck by either copy them in the swap process. However I`ve tested it, and it`s OK, yes I am missing the srand(seed) but my algorithm is working since it never goes out of range and in worst case it can just swap two similar elements like card2 with card2 but it`s no error at all and it`s quite possible in real life shuffle too.
The awkward moment you shuffle and you get 3 times the same cards to piss everybody out on the table... well it`s no algorithm for a lame shuffler, better never gave him/her to pass cards again!