From 942c6a4b48e38277803d3fc771fa4db19545699f Mon Sep 17 00:00:00 2001 From: dnso86 <7543050+dnso86@users.noreply.github.com> Date: Wed, 28 Aug 2019 10:42:10 +0200 Subject: [PATCH] Fixing incorrect buffer in WideCharToMultiByte call in wc2mb --- source/charset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/charset.cpp b/source/charset.cpp index 4ea53570..7ccafec3 100644 --- a/source/charset.cpp +++ b/source/charset.cpp @@ -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