Duels icon indicating copy to clipboard operation
Duels copied to clipboard

Integer overflow when wager gets payed out

Open CdeJong opened this issue 2 years ago • 0 comments

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: afbeelding

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.

CdeJong avatar Aug 29 '23 22:08 CdeJong