summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-10 05:36:58 +0000
committersmatz <smatz@openttd.org>2009-06-10 05:36:58 +0000
commit498d2b0caaeebf67d267d2e00ff4b8b1c1ad7d7a (patch)
tree71f3116f8d8d9c4e46d5fdccbbde11a95005a36c /src
parent0c0943fe8394e2c7d59f37c75c10049ead6f3563 (diff)
downloadopenttd-498d2b0caaeebf67d267d2e00ff4b8b1c1ad7d7a.tar.xz
(svn r16548) -Fix (r16538): removing of duplicates of base graphics set could behave randomly
Diffstat (limited to 'src')
-rw-r--r--src/gfxinit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp
index f471ab226..6878af28f 100644
--- a/src/gfxinit.cpp
+++ b/src/gfxinit.cpp
@@ -468,8 +468,8 @@ bool OBGFileScanner::AddFile(const char *filename, size_t basepath_length)
}
if (duplicate != NULL) {
/* The more complete graphics set takes precedence over the version number. */
- if ((duplicate->files == graphics->files && duplicate->version >= graphics->version) ||
- duplicate->files > graphics->files) {
+ if ((duplicate->found_grfs == graphics->found_grfs && duplicate->version >= graphics->version) ||
+ duplicate->found_grfs > graphics->found_grfs) {
DEBUG(grf, 1, "Not adding %s (%i) as base graphics set (duplicate)", graphics->name, graphics->version);
delete graphics;
} else {