mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 06:36:42 +00:00
[SETUPAPI]
RequiredSize must be in characters in SetupGetInfFileListW svn path=/trunk/; revision=68629
This commit is contained in:
parent
bdb599cd5e
commit
52ba781764
1 changed files with 2 additions and 2 deletions
|
@ -2224,7 +2224,7 @@ SetupGetInfFileListW(
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlenW(wfdFileInfo.cFileName) + 1;
|
len = strlenW(wfdFileInfo.cFileName) + 1;
|
||||||
requiredSize += (DWORD)(len * sizeof(WCHAR));
|
requiredSize += (DWORD)len;
|
||||||
if (requiredSize <= ReturnBufferSize)
|
if (requiredSize <= ReturnBufferSize)
|
||||||
{
|
{
|
||||||
strcpyW(pBuffer, wfdFileInfo.cFileName);
|
strcpyW(pBuffer, wfdFileInfo.cFileName);
|
||||||
|
@ -2234,7 +2234,7 @@ SetupGetInfFileListW(
|
||||||
} while (FindNextFileW(hSearch, &wfdFileInfo));
|
} while (FindNextFileW(hSearch, &wfdFileInfo));
|
||||||
FindClose(hSearch);
|
FindClose(hSearch);
|
||||||
|
|
||||||
requiredSize += sizeof(WCHAR); /* Final NULL char */
|
requiredSize += 1; /* Final NULL char */
|
||||||
if (requiredSize <= ReturnBufferSize)
|
if (requiredSize <= ReturnBufferSize)
|
||||||
{
|
{
|
||||||
*pBuffer = '\0';
|
*pBuffer = '\0';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue