From e0161cf8da063f3cb6fa5283b2616bc8cde0438f Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Sun, 27 Dec 2020 18:10:40 +0000 Subject: Fix b408fe7: Don't try to construct a std::string from nullptr --- src/fileio_func.h | 2 +- src/network/network_content.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fileio_func.h b/src/fileio_func.h index 019573906..d2840b9aa 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -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); diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 7f610d9d3..46e371e6f 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -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! */ -- cgit v1.2.3-54-g00ecf