mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 02:23:47 +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:
@@ -143,7 +143,7 @@ void CNetClientTurnManager::OnSyncError(u32 turn, const CStr& expectedHash, cons
|
||||
scriptInterface.SetProperty(msg, "players", playerNamesStrings);
|
||||
scriptInterface.SetProperty(msg, "expectedHash", expectedHashHex);
|
||||
scriptInterface.SetProperty(msg, "hash", Hexify(hash));
|
||||
scriptInterface.SetProperty(msg, "path_oos_dump", path.string8());
|
||||
scriptInterface.SetProperty(msg, "path_replay", m_Replay.GetDirectory().string8());
|
||||
scriptInterface.SetProperty(msg, "path_oos_dump", wstring_from_utf8(path.string8()));
|
||||
scriptInterface.SetProperty(msg, "path_replay", wstring_from_utf8(m_Replay.GetDirectory().string8()));
|
||||
m_NetClient.PushGuiMessage(msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user