ShellPkg: Fix the 'bcfg' command ASSERT when use some invalid parameters.

'bcfg boot mv xx yy' command will ASSET when xx is larger than the count of boot options.
This patch correct the order of ShellPrintHiiEx parameters to fix the bugs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19295 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Qiu Shumin 2015-12-16 03:18:02 +00:00 committed by shenshushi
parent e7c00761c4
commit 3c8b6a5479
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
Main file for BCFG command.
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -1379,7 +1379,7 @@ ShellCommandRunBcfg (
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
CurrentOperation.Number1 = (UINT16)Intermediate;
if (CurrentOperation.Number1 >= Count){
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), L"bcfg", gShellBcfgHiiHandle, Count);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);