Mercurial > hg > openttd
changeset 13048:f9399c64435f draft
(svn r17546) -Fix (r9617): sign extending of profit calculation didn't work
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 15 Sep 2009 17:23:24 +0000 |
parents | 30208da44525 |
children | adea29ba4429 |
files | src/economy.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/economy.cpp +++ b/src/economy.cpp @@ -815,7 +815,7 @@ 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