Provide a safer version of convertUTF16toUTF8

This commit is contained in:
Ben Payne 2015-01-20 17:45:31 -05:00
parent a88339c219
commit e3bbc42925
10 changed files with 31 additions and 25 deletions

View file

@ -720,13 +720,13 @@ String Platform::FS::getAssetDir()
{
TCHAR buf[ 2048 ];
::GetModuleFileNameW( NULL, buf, sizeof( buf ) );
convertUTF16toUTF8( buf, cen_buf, sizeof( cen_buf ) );
convertUTF16toUTF8( buf, cen_buf );
}
else
{
TCHAR buf[ 2048 ];
GetCurrentDirectoryW( sizeof( buf ) / sizeof( buf[ 0 ] ), buf );
convertUTF16toUTF8( buf, cen_buf, sizeof( cen_buf ) );
convertUTF16toUTF8( buf, cen_buf );
return Path::CleanSeparators(cen_buf);
}
#else