]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/BaseFileHandleLib/BaseFileHandleLib.c
fix operator order.
[mirror_edk2.git] / ShellPkg / Library / BaseFileHandleLib / BaseFileHandleLib.c
index d04a797bdf7a88a870c677e41e13b809679b8433..3200385ee58b0e63f23105b66ff8e0e1f0c12abb 100644 (file)
@@ -668,6 +668,7 @@ StrnCatGrowLeft (
   ){\r
   UINTN DestinationStartSize;\r
   UINTN NewSize;\r
+  UINTN CopySize;\r
 \r
   //\r
   // ASSERTs\r
@@ -714,7 +715,8 @@ StrnCatGrowLeft (
     *Destination = AllocateZeroPool((Count+1)*sizeof(CHAR16));\r
   }\r
 \r
-  *Destination = CopyMem((*Destination)+StrLen(Source), *Destination, StrSize(*Destination));\r
+  CopySize = StrSize(*Destination);\r
+  *Destination = CopyMem((*Destination)+StrLen(Source), *Destination, CopySize);\r
   *Destination = CopyMem(*Destination, Source, StrLen(Source));\r
   return (*Destination);\r
 }\r