mirror of https://github.com/acidanthera/audk.git
ShellPkg: print error when column index is out of range instead of ASSERT.
signed-off-by: jcarsey reviewed-by: leegrosenbaum git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12904 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1921657354
commit
8fcf74a850
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Main file for Parse shell level 2 function.
|
Main file for Parse shell level 2 function.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -91,7 +91,10 @@ PerformParsing(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ColumnLoop == ColumnIndex) {
|
if (ColumnLoop == ColumnIndex) {
|
||||||
ASSERT(ColumnPointer != NULL);
|
if (ColumnPointer == NULL) {
|
||||||
|
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel2HiiHandle, L"Column Index");
|
||||||
|
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||||
|
} else {
|
||||||
TempSpot = StrStr(ColumnPointer, L",");
|
TempSpot = StrStr(ColumnPointer, L",");
|
||||||
if (TempSpot != NULL) {
|
if (TempSpot != NULL) {
|
||||||
*TempSpot = CHAR_NULL;
|
*TempSpot = CHAR_NULL;
|
||||||
|
@ -109,6 +112,7 @@ PerformParsing(
|
||||||
ShellPrintEx(-1, -1, L"%s\r\n", ColumnPointer);
|
ShellPrintEx(-1, -1, L"%s\r\n", ColumnPointer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
SHELL_FREE_NON_NULL(TempLine);
|
SHELL_FREE_NON_NULL(TempLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue