diff options
author | frosch <frosch@openttd.org> | 2010-01-03 19:29:56 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-01-03 19:29:56 +0000 |
commit | 666c856457ebda1a4261d0da95c11ecefc04708f (patch) | |
tree | ea9582ac8df5b3d68a9d1246f859c17c186d554f /src/newgrf_spritegroup.cpp | |
parent | f82c591022c37a2737afd040f65ab04e7af82da1 (diff) | |
download | openttd-666c856457ebda1a4261d0da95c11ecefc04708f.tar.xz |
(svn r18699) -Fix [FS#PlanetAndy]: GRF parameters were not properly initialised to zero, and not always checked for valid range.
Diffstat (limited to 'src/newgrf_spritegroup.cpp')
-rw-r--r-- | src/newgrf_spritegroup.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 74cba113b..348f8ebf0 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -62,8 +62,8 @@ static inline uint32 GetVariable(const ResolverObject *object, byte variable, by case 0x7D: return _temp_store.Get(parameter); case 0x7F: - if (object == NULL || object->grffile == NULL || parameter >= object->grffile->param_end) return 0; - return object->grffile->param[parameter]; + if (object == NULL || object->grffile == NULL) return 0; + return object->grffile->GetParam(parameter); /* Not a common variable, so evalute the feature specific variables */ default: return object->GetVariable(object, variable, parameter, available); |