From 6d625a11e09ea940ea7d26644f0975f263ad36c5 Mon Sep 17 00:00:00 2001 From: dnso86 <7543050+dnso86@users.noreply.github.com> Date: Fri, 30 Aug 2019 14:27:49 +0200 Subject: [PATCH] Fixing incorrect buffer in MultiByteToWideChar 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 7ccafec3..4188b418 100644 --- a/source/charset.cpp +++ b/source/charset.cpp @@ -280,7 +280,7 @@ namespace nana if(chars > 1) { wcstr.resize(chars - 1); - ::MultiByteToWideChar(CP_ACP, 0, s, -1, &wcstr[0], chars - 1); + ::MultiByteToWideChar(CP_ACP, 0, s, -1, &wcstr[0], chars); } #else locale_initializer::init();