(svn r8081) -Fix (r8075): Use a copy of the resolver object instead of the using the existing one. This fixes problems with the object scope setting.
authorpeter1138
Fri, 12 Jan 2007 16:44:08 +0000
changeset 5873 ef74899fd5d7
parent 5872 fbd56d2f8149
child 5874 dabf5af5e281
(svn r8081) -Fix (r8075): Use a copy of the resolver object instead of the using the existing one. This fixes problems with the object scope setting.
src/newgrf_spritegroup.cpp
--- a/src/newgrf_spritegroup.cpp	Fri Jan 12 16:30:41 2007 +0000
+++ b/src/newgrf_spritegroup.cpp	Fri Jan 12 16:44:08 2007 +0000
@@ -144,7 +144,8 @@
 		/* Try to get the variable. We shall assume it is available, unless told otherwise. */
 		bool available = true;
 		if (adjust->variable == 0x7E) {
-			const SpriteGroup *subgroup = Resolve(adjust->subroutine, object);
+			ResolverObject subobject = *object;
+			const SpriteGroup *subgroup = Resolve(adjust->subroutine, &subobject);
 			if (subgroup == NULL || subgroup->type != SGT_CALLBACK) {
 				value = CALLBACK_FAILED;
 			} else {