Skip to content

Commit 2842ef2

Browse files
committed
Fix engineLoadIFP unicode path handling (By Icensow)
engineLoadIFP was returning false for people with path that has unicode characters in them, so it was working for some people only. The problem should be fixed now, hopefully.
1 parent ec22f36 commit 2842ef2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Client/mods/deathmatch/logic/CFileReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void CFileReader::SkipBytes(const std::uint32_t u32BytesToSkip)
4444

4545
bool CFileReader::LoadFileToMemory(const SString& strFilePath)
4646
{
47-
std::ifstream fileStream(strFilePath, std::ios::binary | std::ios::ate);
47+
std::ifstream fileStream(FromUTF8(strFilePath), std::ios::binary | std::ios::ate);
4848
std::streamsize m_iFileSize = fileStream.tellg();
4949
if (m_iFileSize == eIFSTREAM::SIZE_ERROR)
5050
{

0 commit comments

Comments
 (0)