diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2020-12-27 18:10:40 +0000 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2020-12-27 18:30:53 +0000 |
commit | e0161cf8da063f3cb6fa5283b2616bc8cde0438f (patch) | |
tree | 7c2717f7c88e942e285117d29b8d50c2912ca498 | |
parent | 1bb0e6ed8cfba61818343a36111af3902f7d7199 (diff) | |
download | openttd-e0161cf8da063f3cb6fa5283b2616bc8cde0438f.tar.xz |
Fix b408fe7: Don't try to construct a std::string from nullptr
-rw-r--r-- | src/fileio_func.h | 2 | ||||
-rw-r--r-- | src/network/network_content.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
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! */ |