Jump to content

Archived

This topic is now archived and is closed to further replies.

Rydian

Profile Stats: Incorrect Variable Type For Display

Recommended Posts

The "Gross Income" line of the stats display is, for clans at least, using the wrong variable type.

 

income_bug.png

 

Once the credit count passes over 2,147,483,648 (2^31) it starts displaying negative (as the sign bit gets flipped) and then it caps out at the large negative number as seen above.

 

So right now it's using a signed 32-bit integer (DWORD) when it should be using an unsigned 64-bit integer (QWORD) for the highest possible maximum display.

Share this post


Link to post
Share on other sites

*looks at Time Played*

.

.

.

*spits coffee*

 

What the serious fawk?

considering that it's a moon clan, that's not even that many hours lol.

2^31 - 1

Share this post


Link to post
Share on other sites

Sooo.... How many members did your clan have??

Any time I look it's around 800-1000.  Every so often inactive players (like 1month+ gone) are cleared out to take newer ones in.  It's a clan for clantech leechers for the most part, so there's been a lot of shuffling around.

Share this post


Link to post
Share on other sites

maybe_fixed.png

 

As of U15 and the redesigned profile screen, the credit count for the Lone Rangers clan seems to be displaying correctly again, it's no longer a signed DWORD.

 

However we'll see if the value rolls over once we hit the 32-bit cap in about 428,679,680 more credits. :P

Share this post


Link to post
Share on other sites

32-bit cap hit and surpassed... and it seems that it is still a DWORD instead of a QWORD, as it has rolled around and the display now displays how high above the cap we've gotten (the positive difference) instead of the total amount.

 

clan_display_issue.png

 

"Before" is the image in the above post, when we passed 2^31 but were still under 2^32.

"After" image I just took right now, after the clan total surpassed 2^32.

 

So the "After" text should be 4,325,506,747, that seems to be the actual total from my calculations, but in the second screenshot it's incorrect still.

Share this post


Link to post
Share on other sites

15.8.1 now, and we've wrapped around from

3,866,287,616

back to

2,128,231,424

again.

 

And I assume that when we hit

4,294,967,296

We'll wrap around yet again.

 

Really looks like a 64-bit integer for displaying clan total income is needed.

Share this post


Link to post
Share on other sites

We're displaying less than 2^32 credits despite having rolled over at least twice, so this is still happening in 15.10.

Share this post


Link to post
Share on other sites

×
×
  • Create New...