From afdeab52ab8331680a241c10421a4dd583182dec Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 8 Jun 2009 22:13:10 +0000 Subject: (svn r16538) -Fix (r16503): when finding duplicate graphics sets favour the more complete one --- src/gfxinit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 73f2dd3d3..f471ab226 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -467,7 +467,9 @@ bool OBGFileScanner::AddFile(const char *filename, size_t basepath_length) } } if (duplicate != NULL) { - if (duplicate->version >= graphics->version) { + /* The more complete graphics set takes precedence over the version number. */ + if ((duplicate->files == graphics->files && duplicate->version >= graphics->version) || + duplicate->files > graphics->files) { DEBUG(grf, 1, "Not adding %s (%i) as base graphics set (duplicate)", graphics->name, graphics->version); delete graphics; } else { -- cgit v1.2.3-70-g09d2