summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-02-04 08:29:14 +0000
committeryexo <yexo@openttd.org>2011-02-04 08:29:14 +0000
commitc70ee16ecf0f83ea1bf0ac1087324c52dfce5f6e (patch)
tree7f11fedce0b8394f38b392cd540654b73d0e8046 /src
parent053420399a2db2b50a352ab46273d36e3025f312 (diff)
downloadopenttd-c70ee16ecf0f83ea1bf0ac1087324c52dfce5f6e.tar.xz
(svn r21951) -Fix: [NewGRF] reset the carry flag every 4 bytes in action6 when adding more than one variable
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index e398edbb8..6f989e3a5 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5129,7 +5129,7 @@ static void CfgApply(ByteReader *buf)
uint32 value = GetParamVal(param_num + i / 4, NULL);
/* Reset carry flag for each iteration of the variable (only really
* matters if param_size is greater than 4) */
- if (i == 0) carry = false;
+ if (i % 4 == 0) carry = false;
if (add_value) {
uint new_value = preload_sprite[offset + i] + GB(value, (i % 4) * 8, 8) + (carry ? 1 : 0);