mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
Fix the replay menu for people with non-latin characters in their username.
Use OsPath instead of CStr and CStrW where possible,
wstring_from_utf8(OsPath.string8()) to pass printable strings to the
JSAPI,
OsString when opening a filestream and
off_t instead of int for filesizes.
Fixes #4320
Differential Revision: https://code.wildfiregames.com/D518
Reviewed By: Imarok
Tested By: Imarok on Windows, wraitii on OSX
Special thanks to Philip for advice and the lib/path.h fix in
47cc447322.
This was SVN commit r19824.
This commit is contained in:
@@ -106,11 +106,11 @@ CReplayPlayer::~CReplayPlayer()
|
||||
delete m_Stream;
|
||||
}
|
||||
|
||||
void CReplayPlayer::Load(const std::string& path)
|
||||
void CReplayPlayer::Load(const OsPath& path)
|
||||
{
|
||||
ENSURE(!m_Stream);
|
||||
|
||||
m_Stream = new std::ifstream(path.c_str());
|
||||
m_Stream = new std::ifstream(OsString(path).c_str());
|
||||
ENSURE(m_Stream->good());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user