Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasimir666 <casimir666@users.sourceforge.net>2007-05-06 20:08:40 +0400
committerCasimir666 <casimir666@users.sourceforge.net>2007-05-06 20:08:40 +0400
commit0a1b11126125e4c1456673b31b25b2ed77d5f4a2 (patch)
tree0d3a8eba56b32ce8b0bae765cf2a290d434c7be6 /src/subtitles/STS.cpp
parent277ad65c1bcc33244df7afac929d2f190e0d8ecf (diff)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@84 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/subtitles/STS.cpp')
-rw-r--r--src/subtitles/STS.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/subtitles/STS.cpp b/src/subtitles/STS.cpp
index c611c92b9..b052e6780 100644
--- a/src/subtitles/STS.cpp
+++ b/src/subtitles/STS.cpp
@@ -2964,7 +2964,7 @@ void STSStyle::operator = (LOGFONT& lf)
LOGFONTA& operator <<= (LOGFONTA& lfa, STSStyle& s)
{
lfa.lfCharSet = s.charSet;
- strcpy_s(lfa.lfFaceName, CStringA(s.fontName));
+ strncpy_s(lfa.lfFaceName, LF_FACESIZE, CStringA(s.fontName), _TRUNCATE);
HDC hDC = GetDC(0);
lfa.lfHeight = -MulDiv((int)(s.fontSize+0.5), GetDeviceCaps(hDC, LOGPIXELSY), 72);
ReleaseDC(0, hDC);
@@ -2978,7 +2978,7 @@ LOGFONTA& operator <<= (LOGFONTA& lfa, STSStyle& s)
LOGFONTW& operator <<= (LOGFONTW& lfw, STSStyle& s)
{
lfw.lfCharSet = s.charSet;
- wcscpy_s(lfw.lfFaceName, CStringW(s.fontName));
+ wcsncpy_s(lfw.lfFaceName, LF_FACESIZE, CStringW(s.fontName), _TRUNCATE);
HDC hDC = GetDC(0);
lfw.lfHeight = -MulDiv((int)(s.fontSize+0.5), GetDeviceCaps(hDC, LOGPIXELSY), 72);
ReleaseDC(0, hDC);