Error checking in cardStackFromCStr