summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index b579e5e98..6902fcdb5 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -456,12 +456,12 @@ char *FindUnknownGRFName(uint32 grfid, uint8 *md5sum, bool create)
/* Retrieve a NewGRF from the current config by its grfid */
-GRFConfig *GetGRFConfig(uint32 grfid)
+GRFConfig *GetGRFConfig(uint32 grfid, uint32 mask)
{
GRFConfig *c;
for (c = _grfconfig; c != NULL; c = c->next) {
- if (c->grfid == grfid) return c;
+ if ((c->grfid & mask) == (grfid & mask)) return c;
}
return NULL;