- Fix CdfsWSubString() prototype
- Use it in CdfsCreateFCB() for string copy

CID #511047

svn path=/trunk/; revision=62676
This commit is contained in:
Pierre Schweitzer 2014-04-06 21:02:21 +00:00
parent dc8ea64b3f
commit 1f6df38614

View file

@ -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, '\\');