mirror of
https://github.com/rwengine/openrw.git
synced 2024-10-06 09:07:19 +02:00
Don't cast from wide chars to chars on windows
This commit is contained in:
parent
62d0bf796a
commit
239d19a310
@ -290,7 +290,7 @@ void GameData::loadGXT(const std::string &name)
|
|||||||
void GameData::loadWaterpro(const std::string& path)
|
void GameData::loadWaterpro(const std::string& path)
|
||||||
{
|
{
|
||||||
auto syspath = index.findFilePath(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()) {
|
if(ifstr.is_open()) {
|
||||||
uint32_t numlevels;
|
uint32_t numlevels;
|
||||||
|
@ -23,7 +23,7 @@ void FileIndex::indexGameDirectory(const fs::path& base_path)
|
|||||||
FileHandle FileIndex::openFilePath(const std::string &file_path)
|
FileHandle FileIndex::openFilePath(const std::string &file_path)
|
||||||
{
|
{
|
||||||
auto datapath = findFilePath(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()) {
|
if ( ! dfile.is_open()) {
|
||||||
throw std::runtime_error("Unable to open file: " + file_path);
|
throw std::runtime_error("Unable to open file: " + file_path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user