Fixing incorrect buffer in WideCharToMultiByte call in wc2mb

This commit is contained in:
dnso86 2019-08-28 10:42:10 +02:00 committed by GitHub
parent dbd8a4a691
commit 942c6a4b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,7 @@ namespace nana
if(bytes > 1)
{
mbstr.resize(bytes - 1);
::WideCharToMultiByte(CP_ACP, 0, s, -1, &(mbstr[0]), bytes - 1, 0, 0);
::WideCharToMultiByte(CP_ACP, 0, s, -1, &(mbstr[0]), bytes, 0, 0);
}
return true;
#else