# HG changeset patch # User rubidium # Date 2009-06-08 22:13:10 # Node ID 1b341ef0f22afae0be374ff44d4b0312a51508a6 # Parent 2dc5f1edc34c57a495b211682f16db47128552ec (svn r16538) -Fix (r16503): when finding duplicate graphics sets favour the more complete one diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -467,7 +467,9 @@ bool OBGFileScanner::AddFile(const char } } 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 {