diff --git a/src/fios.cpp b/src/fios.cpp --- a/src/fios.cpp +++ b/src/fios.cpp @@ -629,13 +629,12 @@ const char *FiosGetScreenshotDir() /** Basic data to distinguish a scenario. Used in the server list window */ struct ScenarioIdentifier { uint32 scenid; ///< ID for the scenario (generated by content). - uint8 md5sum[16]; ///< MD5 checksum of file. + MD5Hash md5sum; ///< MD5 checksum of file. std::string filename; ///< filename of the file. bool operator == (const ScenarioIdentifier &other) const { - return this->scenid == other.scenid && - memcmp(this->md5sum, other.md5sum, sizeof(this->md5sum)) == 0; + return this->scenid == other.scenid && this->md5sum == other.md5sum; } bool operator != (const ScenarioIdentifier &other) const @@ -714,7 +713,7 @@ const char *FindScenario(const ContentIn _scanner.Scan(false); for (ScenarioIdentifier &id : _scanner) { - if (md5sum ? (memcmp(id.md5sum, ci->md5sum, sizeof(id.md5sum)) == 0) + if (md5sum ? (id.md5sum == ci->md5sum) : (id.scenid == ci->unique_id)) { return id.filename.c_str(); }