When using betting amounts higher than half of the (positive) integer limit, the payout amount will overflow to a negative number.
In this example 1,500,000,000.00 was used as wager:
An easy fix would be changing all integers in the plugin to doubles, as this is what vault is using and they have a much higher maximum value. As an extra precaution, I would add a configurable maximum betting amount.
When using betting amounts higher than half of the (positive) integer limit, the payout amount will overflow to a negative number.
In this example 1,500,000,000.00 was used as wager:
An easy fix would be changing all integers in the plugin to doubles, as this is what vault is using and they have a much higher maximum value. As an extra precaution, I would add a configurable maximum betting amount.