diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-24 21:32:00 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-07-24 21:32:00 +0000 |
commit | 46f43bc4bce94f7b4c9a1f25598f77bed5a11e5d (patch) | |
tree | 7875fc250898e308d07faa213f216ac8310dd0ca /ShellPkg/Library | |
parent | 2828833eaefba859233c033d27fd4bb803a92547 (diff) | |
download | edk2-46f43bc4bce94f7b4c9a1f25598f77bed5a11e5d.zip edk2-46f43bc4bce94f7b4c9a1f25598f77bed5a11e5d.tar.gz edk2-46f43bc4bce94f7b4c9a1f25598f77bed5a11e5d.tar.bz2 |
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
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r-- | ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c b/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c index 808ac74..cd72cbd 100644 --- a/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c +++ b/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c @@ -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;
}
}
|