diff src/newgrf_gui.cpp @ 16256:49226e68e209 draft

(svn r20957) -Codechange: Add another parameter to FindGRFConfig() to define search restrictions.
author frosch <frosch@openttd.org>
date Sun, 17 Oct 2010 12:12:13 +0000 (2010-10-17)
parents dd6d2c758c96
children 8a820ca2e1f7
line wrap: on
line diff
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -1035,7 +1035,7 @@
 					bool compatible = HasBit(c->flags, GCF_COMPATIBLE);
 					if (c->status != GCS_NOT_FOUND && !compatible) continue;
 
-					const GRFConfig *f = FindGRFConfig(c->ident.grfid, compatible ? c->original_md5sum : c->ident.md5sum);
+					const GRFConfig *f = FindGRFConfig(c->ident.grfid, FGCM_EXACT, compatible ? c->original_md5sum : c->ident.md5sum);
 					if (f == NULL) continue;
 
 					*l = new GRFConfig(*f);
@@ -1211,7 +1211,7 @@
 			if (_settings_client.gui.newgrf_show_old_versions) {
 				*this->avails.Append() = c;
 			} else {
-				const GRFConfig *best = FindGRFConfig(c->ident.grfid, NULL);
+				const GRFConfig *best = FindGRFConfig(c->ident.grfid, FGCM_NEWEST);
 				/*
 				 * If the best version is 0, then all NewGRF with this GRF ID
 				 * have version 0, so for backward compatability reasons we