As the topic said. That happend as I sold cobra with jameson at lave with the
Realistic Ship Yards installed.
That happened without Realistic Ship Yards installed but with a lot other OXPs loaded.
Reported the bug to the berlios bug tracker.
selling a ship gives me 1 000 000 credits in oolite 1.71.2
Moderators: winston, another_commander, Getafix
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
I have seen something similar with the current Trunk version, where selling my Hamadryad to buy a Drake (I think it was a Drake) got me a huge lot of cash.
I think its probably an overflow thing, like the last time we saw this bug. I did start looking into it, but I got distracted by 32 and 64 bit floats, while looking to see if there was something funny going on in the type conversion.
I think its probably an overflow thing, like the last time we saw this bug. I did start looking into it, but I got distracted by 32 and 64 bit floats, while looking to see if there was something funny going on in the type conversion.
just funny that an overflow would hit 1,000,000.00 precisely, I cant recall the largest value for an INT(even though i think this is system specific), while the credits prolly is a Double or Float.Cmdr James wrote:I think its probably an overflow thing, like the last time we saw this bug. I did start looking into it, but I got distracted by 32 and 64 bit floats, while looking to see if there was something funny going on in the type conversion.
Bounty Scanner
Number 935
Number 935
oh clearification, love it.. then i retract my earlier comment...krombart wrote:Its not exactly 1 000 000 but its alway around this value sometimes 990k or even 1 006 k
Bounty Scanner
Number 935
Number 935
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
There seems to be an issue when Oolite tries to subtract the ship value credits from your total credits upon buying a ship. This occurs in the trunk version only. The calculation it does is
which is totally wrong. The trade_in value has been already multiplied by 10 before, so we end up overflowing. It should be
The fix will go in the trunk in a few minutes.
Edit: I am unable to reproduce this in any way with 1.71.2. The equivalent part of the code for the 1.71.2 tree looks OK to me. I am beginning to suspect a possible issue with the Linux package. This is the second report of 1.71.2 behaving like the trunk version on Linux.
Code: Select all
credits -= 10 * (price - trade_in);
Code: Select all
credits -= 10 * price - trade_in;
Edit: I am unable to reproduce this in any way with 1.71.2. The equivalent part of the code for the 1.71.2 tree looks OK to me. I am beginning to suspect a possible issue with the Linux package. This is the second report of 1.71.2 behaving like the trunk version on Linux.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
I’m not sure where that autopackage came from, but I’ll take the easy route and blame Winston. :-)
E-mail: [email protected]