diff --git a/rwengine/src/engine/GameData.cpp b/rwengine/src/engine/GameData.cpp index 41c563e4..d45f2e7b 100644 --- a/rwengine/src/engine/GameData.cpp +++ b/rwengine/src/engine/GameData.cpp @@ -290,7 +290,7 @@ void GameData::loadGXT(const std::string &name) void GameData::loadWaterpro(const std::string& path) { auto syspath = index.findFilePath(path); - std::ifstream ifstr((const char*)syspath.c_str(), std::ios_base::binary); + std::ifstream ifstr(syspath.string(), std::ios_base::binary); if(ifstr.is_open()) { uint32_t numlevels; diff --git a/rwlib/source/platform/FileIndex.cpp b/rwlib/source/platform/FileIndex.cpp index 7a223d01..52b47066 100644 --- a/rwlib/source/platform/FileIndex.cpp +++ b/rwlib/source/platform/FileIndex.cpp @@ -23,7 +23,7 @@ void FileIndex::indexGameDirectory(const fs::path& base_path) FileHandle FileIndex::openFilePath(const std::string &file_path) { auto datapath = findFilePath(file_path); - std::ifstream dfile((const char*)datapath.c_str(), std::ios_base::binary | std::ios_base::ate); + std::ifstream dfile(datapath.string(), std::ios_base::binary | std::ios_base::ate); if ( ! dfile.is_open()) { throw std::runtime_error("Unable to open file: " + file_path); }