If a gambler will continue to have that kind of mindset, he's nowhere to go. Many of his friends are going to be away from him if he has taken a loan already from them even they're paid.
Because out of the activity of being a gambler, they'll look to themselves being a partaker of their friend who's addicted and has the habit of taking loan for gambling.
Yes, you are right, if we have a friend who is a gambler, especially if he is said to be a serious addict, we must always be careful because it could be that we often borrow money from us and the money will not be returned quickly.
Sometimes, if we have a very close relationship with a friend, perhaps we will not bear the suffering he is experiencing and with compassion we are ready to help him by lending him money even if it is used for gambling.
However, we must always remember that we must be prepared to give up the money if the return does not match the promise to be paid. So, those are the consequences and risks that we will bear ourselves if we lend money to gambling friends.