Sponsor's stats go negative when it exceeding the max

Happened after sponsoring, everything was working normal before this, and all other sponsors I was running for different platforms with smaller numbers are still showing as intended. I believe the sponsor itself is still working as intended aside from this.

2 Likes

This is caused by an integer overflow where it’ll wrap round if the number gets too big

I’ll try to explain it without getting too technical
Lets assume we have an 8 bit number
01111111 which would equal 127

If I were to add 1 to the binary number, it would suddenly become -128 because of the 2s-compliment rule

4 Likes