/** @file\r
*\r
-* Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+* Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
*\r
* This program and the accompanying materials\r
* are licensed and made available under the terms and conditions of the BSD License\r
if (BootOrder[Index] == BootOption->LoadOptionIndex) {\r
// If it the last entry we do not need to rearrange the BootOrder list\r
if (Index + 1 != BootOrderCount) {\r
- CopyMem (&BootOrder[Index],&BootOrder[Index+1], BootOrderCount - (Index + 1));\r
+ CopyMem (\r
+ &BootOrder[Index],\r
+ &BootOrder[Index + 1],\r
+ (BootOrderCount - (Index + 1)) * sizeof(UINT16)\r
+ );\r
}\r
break;\r
}\r