diff --git a/src/auto4_base.cpp b/src/auto4_base.cpp index 8bb753d62..d51a3e98f 100644 --- a/src/auto4_base.cpp +++ b/src/auto4_base.cpp @@ -86,7 +86,7 @@ namespace Automation4 { lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; lf.lfQuality = ANTIALIASED_QUALITY; lf.lfPitchAndFamily = DEFAULT_PITCH|FF_DONTCARE; - wcsncpy(lf.lfFaceName, agi::charset::ConvertW(style->font).c_str(), 32); + wcsncpy(lf.lfFaceName, agi::charset::ConvertW(style->font).c_str(), 31); HFONT thefont = CreateFontIndirect(&lf); if (!thefont) return false;