aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 2a6ac369d..8d5af5815 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -45,6 +45,7 @@
#include "SciLexer.h"
#include "LexerModule.h"
#endif
+#include "StringCopy.h"
#include "SplitVector.h"
#include "Partitioning.h"
#include "RunStyles.h"
@@ -2149,8 +2150,8 @@ void ScintillaWin::ImeStartComposition() {
lf.lfItalic = static_cast<BYTE>(vs.styles[styleHere].italic ? 1 : 0);
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfFaceName[0] = '\0';
- if (vs.styles[styleHere].fontName && (strlen(vs.styles[styleHere].fontName) < sizeof(lf.lfFaceName)))
- strcpy(lf.lfFaceName, vs.styles[styleHere].fontName);
+ if (vs.styles[styleHere].fontName)
+ StringCopy(lf.lfFaceName, vs.styles[styleHere].fontName);
::ImmSetCompositionFontA(hIMC, &lf);
}