mirror of
https://github.com/rwengine/openrw.git
synced 2025-04-28 12:58:05 +03:00
Don't cast from wide chars to chars on windows
This commit is contained in:
parent
62d0bf796a
commit
239d19a310
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue