summaryrefslogtreecommitdiffstats
path: root/ShellPkg
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-09 17:36:06 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-09 17:36:06 +0000
commit727a4c7101e464b49aa7d3c8d6cc675e67b7118e (patch)
treefe31900f1019d01756a1904f67460d64466908a1 /ShellPkg
parent97482d9486559eaeb410088c33fa7862ed6b091c (diff)
downloadedk2-727a4c7101e464b49aa7d3c8d6cc675e67b7118e.tar.gz
edk2-727a4c7101e464b49aa7d3c8d6cc675e67b7118e.tar.bz2
edk2-727a4c7101e464b49aa7d3c8d6cc675e67b7118e.zip
fix operator order.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8844 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c b/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c
index d04a797bdf..3200385ee5 100644
--- a/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c
+++ b/ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c
@@ -668,6 +668,7 @@ StrnCatGrowLeft (
){
UINTN DestinationStartSize;
UINTN NewSize;
+ UINTN CopySize;
//
// ASSERTs
@@ -714,7 +715,8 @@ StrnCatGrowLeft (
*Destination = AllocateZeroPool((Count+1)*sizeof(CHAR16));
}
- *Destination = CopyMem((*Destination)+StrLen(Source), *Destination, StrSize(*Destination));
+ CopySize = StrSize(*Destination);
+ *Destination = CopyMem((*Destination)+StrLen(Source), *Destination, CopySize);
*Destination = CopyMem(*Destination, Source, StrLen(Source));
return (*Destination);
}