mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 06:13:05 +00:00
[APITESTS] Use StringCbPrintfA instead of sprintf
And fix a buffer size in Test_AddFontResourceA
This commit is contained in:
parent
f7dc14cca5
commit
6b10706205
8 changed files with 36 additions and 32 deletions
|
@ -18,9 +18,9 @@ PVOID LoadCodePageData(ULONG Code)
|
|||
GetSystemDirectoryA(sysdir, MAX_PATH);
|
||||
|
||||
if (Code != -1)
|
||||
sprintf(filename, "%s\\c_%lu.nls", sysdir, Code);
|
||||
StringCbPrintfA(filename, sizeof(filename), "%s\\c_%lu.nls", sysdir, Code);
|
||||
else
|
||||
sprintf(filename, "%s\\l_intl.nls", sysdir);
|
||||
StringCbPrintfA(filename, sizeof(filename), "%s\\l_intl.nls", sysdir);
|
||||
|
||||
hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue