mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 09:01:13 +00:00
[CDFS]
- Fix CdfsWSubString() prototype - Use it in CdfsCreateFCB() for string copy CID #511047 svn path=/trunk/; revision=62676
This commit is contained in:
parent
dc8ea64b3f
commit
1f6df38614
|
@ -57,7 +57,7 @@ CdfsGetNextPathElement(PWCHAR FileName)
|
|||
|
||||
|
||||
static VOID
|
||||
CdfsWSubString(PWCHAR pTarget, const PWCHAR pSource, size_t pLength)
|
||||
CdfsWSubString(LPWSTR pTarget, LPCWSTR pSource, size_t pLength)
|
||||
{
|
||||
wcsncpy (pTarget, pSource, pLength);
|
||||
pTarget [pLength] = L'\0';
|
||||
|
@ -76,7 +76,7 @@ CdfsCreateFCB(PCWSTR FileName)
|
|||
|
||||
if (FileName)
|
||||
{
|
||||
wcscpy(Fcb->PathName, FileName);
|
||||
CdfsWSubString(Fcb->PathName, FileName, sizeof(Fcb->PathName) / sizeof(Fcb->PathName[0]) - 1);
|
||||
if (wcsrchr(Fcb->PathName, '\\') != 0)
|
||||
{
|
||||
Fcb->ObjectName = wcsrchr(Fcb->PathName, '\\');
|
||||
|
|
Loading…
Reference in a new issue