To be safe from the consequences, since perhaps it is well-established, report the bug, because there could be charges if they would found out that you took advantage of the problem. But it would really be tempting for sure knowing how hard it is to earn profit, or to simply get the win, in gambling. But for a long run, doing the right thing is the best.
the best thing to do in these cases is to report the bug to the operators of the gambling site hoping that they will be grateful by giving you a bonus or credit on their site...
That is right, they might reward you which is a win-win situation: you did the right way and you will also earn a reward for doing so. Think of such thing if ever the bug will be encountered by other players and it was used against you, would it still be fun if you are the one who suffer from the bug? Obviously it will not. That is what I am trying to point out with "longterm" enjoyment. And it would be better to feel a 'win' without cheating, not only in gambling but to most of the things.