Jump to content

Credit Bug!


Recommended Posts

yes I just fixed it. I'll be on in a few seconds to do my usual harbinger of shutdown appearance.

Hey that sounds quite catchy, it could be a metal song:

'Harbinger of Shutdown'

Pure black, looking clear,
my work is done soon here
try logging back to me,
get back what used to be,
Drink up, log in,
let the (mob) beatings begin
Distributor of projectile pain,
your damage is quite insane!

Harbinger of Shutdown!
20 minutes to go ...
Link to comment
Share on other sites

Fixed! :)
Thank you! :)
Quitted to desktop: Credits: 205088
Logged in: Credits: 205088
What caused this error, that made people loosing Credits?

Regards,
Xrun Edited by xrun
Link to comment
Share on other sites

oh I see.

The bug was as simple as a cast on an SQL write:

[font="Consolas"][size="2"][font="Consolas"][size="2"]sprintf_s(m_QueryStr,s[/size][/font][/size][/font][font="Consolas"][size="2"][color="#0000ff"][font="Consolas"][size="2"][color="#0000ff"][font="Consolas"][size="2"][color="#0000ff"]izeof[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"](m_QueryStr),[/size][/font][/size][/font][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"][font="Consolas"][size="2"][color="#a31515"]"UPDATE %s.avatar_level_info SET credits = '%I64d' WHERE avatar_id = '%d'"[/color][/size][/font][/color][/size][/font][/color][/size][/font][font="Consolas"][size="2"][font="Consolas"][size="2"], NET7_USERS, (long)credits, player_id);[/size][/font][/size][/font]

[font=arial,helvetica,sans-serif][size=4]our 'lint' program had added the (long) cast to credits, which is a 64bit int value (so you can have more than 4 billion credits), which completely broke the sprintf write.[/size][/font]

[font=arial,helvetica,sans-serif][size=4]Was fixed simply by removing (long) from in front of the credits. I doubt we'll be using that program again after all the other chaos it's caused (thread lockups, corrupted security tokens and this).[/size][/font]
Link to comment
Share on other sites

[quote name='Tienbau' timestamp='1335922631' post='57296']
oh I see.

The bug was as simple as a cast on an SQL write:

[font=Consolas][size=2]sprintf_s(m_QueryStr,s[/size][/font][font=Consolas][size=2][color=#0000ff]izeof[/color][/size][/font][font=Consolas][size=2](m_QueryStr),[/size][/font][font=Consolas][size=2][color=#a31515]"UPDATE %s.avatar_level_info SET credits = '%I64d' WHERE avatar_id = '%d'"[/color][/size][/font][font=Consolas][size=2], NET7_USERS, (long)credits, player_id);[/size][/font]

[font=arial,helvetica,sans-serif]our 'lint' program had added the (long) cast to credits, which is a 64bit int value (so you can have more than 4 billion credits), which completely broke the sprintf write.[/font]

[font=arial,helvetica,sans-serif]Was fixed simply by removing (long) from in front of the credits. I doubt we'll be using that program again after all the other chaos it's caused (thread lockups, corrupted security tokens and this).[/font]
[/quote]

Thats what I was going to say !
Link to comment
Share on other sites

Hi, I was ill and missed a day of playing, so didn't realize I lost all my credits until I logged in a few minutes ago. My friend lost all of hers when she logged out as well, but was logging onto several different characters during that time to help me get up to speed since it's all her fault I'm playing, lol. I lost in the neighborhood of 438,000 credits, I think. It was under 450k, but I didn't write it down. :P Now I have 0 credits and don't remember what we did to make some quick money. :P Can someone help, please?

Oh, I was on Aeolian :) Edited by Moondancer
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...