changeset 17212:8ff9a1084a3c draft

(svn r21951) -Fix: [NewGRF] reset the carry flag every 4 bytes in action6 when adding more than one variable
author yexo <yexo@openttd.org>
date Fri, 04 Feb 2011 08:29:14 +0000
parents 506aa46826a7
children 4111445c818e
files src/newgrf.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5129,7 +5129,7 @@
 			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);