[BUG] Money hud doesn't show values above 999 milions

Started by PunkNoodle, Jun 29, 2018, 05:46 AM

Previous topic - Next topic

PunkNoodle

Reproducible
Always

What you were doing when the bug happened
I tried setting 2,147,483,647 as cash and noticed the hud shows just 999,999,999, if however I were to set the same amount + 1 (and thus beyond the limit) it will shows all the figures including the minus. Despite the hud, getting the cash from the player showed the correct amount I've set.

What you think caused the bug
Perhaps default game behaviour, since it's unlikely anybody would ever reach such amount.


DizzasTeR


NicusorN5

#3
Quote from: Doom_Kill3R on Jun 29, 2018, 06:33 AMThis is most likely an integer overflow issue
No shit sherlock.

@PunkNoodle is damn right, that 'bug' is default game's behiavour. If i set the cash to the maximum's int32 value ( 0x7ffffff or 2147483647 ) the cash will be still positive. While the game shows that 999,999,999 value. An integer overflow is when i increase the maximum value with for example 1, it will get the minimum value + 1 (-2147483648 ).

Quote from: PunkNoodle on Jun 29, 2018, 05:46 AMit's unlikely anybody would ever reach such amount.
Pfft. In my own server , every admin has the maximum number of cash xD.