mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-24 11:46:22 +00:00
more unicode/string cleanup:
- swprintf -> swprintf_s - use secure_crt's _wfopen_s instead of conversion+fopen - centralize all MBS <-> WCS conversion in new wchar.cpp (requires workspace rebuild) - remove no longer needed os_path - remove unnecessary fs::wpath / VfsPath constructor casts - fixed buffer size parameters -> ARRAY_SIZE This was SVN commit r7162.
This commit is contained in:
@@ -72,8 +72,7 @@ template <>
|
||||
CStrW ToNetString(const SColour &data)
|
||||
{
|
||||
wchar_t buf[256];
|
||||
swprintf(buf, 256, L"%f %f %f %f", data.r, data.g, data.b, data.a);
|
||||
buf[255]=0;
|
||||
swprintf_s(buf, ARRAY_SIZE(buf), L"%f %f %f %f", data.r, data.g, data.b, data.a);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user