didnt want to change pointer for copymem...

corrected full file name creation

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9007 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey 2009-07-24 21:32:00 +00:00
parent 2828833eae
commit 46f43bc4bc
1 changed files with 10 additions and 5 deletions

View File

@ -708,8 +708,8 @@ StrnCatGrowLeft (
}
CopySize = StrSize(*Destination);
*Destination = CopyMem(*Destination+Count-sizeof(CHAR16), *Destination, CopySize);
*Destination = CopyMem(*Destination, Source, Count);
CopyMem((*Destination)+((Count-2)/sizeof(CHAR16)), *Destination, CopySize);
CopyMem(*Destination, Source, Count-2);
return (*Destination);
}
@ -766,12 +766,17 @@ FileHandleGetFileName (
// We got info... do we have a name? if yes preceed the current path with it...
//
if (StrLen (FileInfo->FileName) == 0) {
*FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"/", 0);
if (*FullFileName == NULL) {
*FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"\\", 0);
}
FreePool(FileInfo);
break;
} else {
if (*FullFileName == NULL) {
*FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"\\", 0);
}
*FullFileName = StrnCatGrowLeft(FullFileName, &Size, FileInfo->FileName, 0);
*FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"/", 0);
*FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"\\", 0);
FreePool(FileInfo);
}
}
@ -855,7 +860,7 @@ FileHandleReadLine(
//
if ((CountSoFar+1)*sizeof(CHAR16) < *Size){
((CHAR16*)Buffer)[CountSoFar] = CharBuffer;
((CHAR16*)Buffer)[CountSoFar+1] = '\0';
((CHAR16*)Buffer)[CountSoFar+1] = CHAR_NULL;
}
}