mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[CHARMAP]
Use rather wcsncpy(). A bit less safe, but at least, data are copied till possible svn path=/trunk/; revision=62675
This commit is contained in:
parent
b2ec16885c
commit
dc8ea64b3f
2 changed files with 6 additions and 6 deletions
|
@ -48,9 +48,9 @@ SetLrgFont(PMAP infoPtr)
|
|||
hdc);
|
||||
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
wcscpy_s(lf.lfFaceName,
|
||||
sizeof(lf.lfFaceName) / sizeof(lf.lfFaceName[0]),
|
||||
lpFontName);
|
||||
wcsncpy(lf.lfFaceName,
|
||||
lpFontName,
|
||||
sizeof(lf.lfFaceName) / sizeof(lf.lfFaceName[0]));
|
||||
|
||||
hFont = CreateFontIndirectW(&lf);
|
||||
|
||||
|
|
|
@ -228,9 +228,9 @@ SetFont(PMAP infoPtr,
|
|||
ReleaseDC(infoPtr->hMapWnd, hdc);
|
||||
|
||||
infoPtr->CurrentFont.lfCharSet = DEFAULT_CHARSET;
|
||||
wcscpy_s(infoPtr->CurrentFont.lfFaceName,
|
||||
sizeof(infoPtr->CurrentFont.lfFaceName) / sizeof(infoPtr->CurrentFont.lfFaceName[0]),
|
||||
lpFontName);
|
||||
wcsncpy(infoPtr->CurrentFont.lfFaceName,
|
||||
lpFontName,
|
||||
sizeof(infoPtr->CurrentFont.lfFaceName) / sizeof(infoPtr->CurrentFont.lfFaceName[0]));
|
||||
|
||||
infoPtr->hFont = CreateFontIndirectW(&infoPtr->CurrentFont);
|
||||
|
||||
|
|
Loading…
Reference in a new issue