diff options
author | rubidium <rubidium@openttd.org> | 2009-09-15 17:23:24 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-09-15 17:23:24 +0000 |
commit | ac36433b5256948a1e4c94e8d04b184a58a70628 (patch) | |
tree | 0b3047468a64572ed0397638680b1d9a1dca83ee /src | |
parent | f2487381ce266241952b3e0d8f796740d405f0ea (diff) | |
download | openttd-ac36433b5256948a1e4c94e8d04b184a58a70628.tar.xz |
(svn r17546) -Fix (r9617): sign extending of profit calculation didn't work
Diffstat (limited to 'src')
-rw-r--r-- | src/economy.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 340b6fdb7..6436f0fc0 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -815,7 +815,7 @@ Money GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, C int result = GB(callback, 0, 14); /* Simulate a 15 bit signed value */ - if (HasBit(callback, 14)) result = 0x4000 - result; + if (HasBit(callback, 14)) result -= 0x4000; /* "The result should be a signed multiplier that gets multiplied * by the amount of cargo moved and the price factor, then gets |