(svn r16548) -Fix (r16538): removing of duplicates of base graphics set could behave randomly

This commit is contained in:
smatz 2009-06-10 05:36:58 +00:00
parent ac991bff90
commit e300d153cc

View File

@ -468,8 +468,8 @@ bool OBGFileScanner::AddFile(const char *filename, size_t basepath_length)
} }
if (duplicate != NULL) { if (duplicate != NULL) {
/* The more complete graphics set takes precedence over the version number. */ /* The more complete graphics set takes precedence over the version number. */
if ((duplicate->files == graphics->files && duplicate->version >= graphics->version) || if ((duplicate->found_grfs == graphics->found_grfs && duplicate->version >= graphics->version) ||
duplicate->files > graphics->files) { duplicate->found_grfs > graphics->found_grfs) {
DEBUG(grf, 1, "Not adding %s (%i) as base graphics set (duplicate)", graphics->name, graphics->version); DEBUG(grf, 1, "Not adding %s (%i) as base graphics set (duplicate)", graphics->name, graphics->version);
delete graphics; delete graphics;
} else { } else {