1
0
Fork 0

Fix b408fe7: Don't try to construct a std::string from nullptr

pull/8456/head
Charles Pigott 2020-12-27 18:10:40 +00:00
parent 1bb0e6ed8c
commit e0161cf8da
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ public:
ALL = BASESET | NEWGRF | AI | SCENARIO | GAME, ///< Scan for everything.
};
bool AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename = nullptr) override;
bool AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename = {}) override;
bool AddFile(Subdirectory sd, const std::string &filename);

View File

@ -539,7 +539,7 @@ void ClientNetworkContentSocketHandler::AfterDownload()
TarScanner ts;
std::string fname = GetFullFilename(this->curInfo, false);
ts.AddFile(sd, fname.c_str());
ts.AddFile(sd, fname);
if (this->curInfo->type == CONTENT_TYPE_BASE_MUSIC) {
/* Music can't be in a tar. So extract the tar! */