(svn r16538) -Fix (r16503): when finding duplicate graphics sets favour the more complete one

This commit is contained in:
rubidium 2009-06-08 22:13:10 +00:00
parent 050bbb4dac
commit afdeab52ab
1 changed files with 3 additions and 1 deletions

View File

@ -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 {