ShellPkg UefiDpLib: Use correct string length for the input UnicodeBuffer

Same as the beginning of function to use DP_GAUGE_STRING_LENGTH, but not
DXE_PERFORMANCE_STRING_LENGTH.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18725 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Star Zeng 2015-11-04 01:56:29 +00:00 committed by lzeng14
parent e5cffcad87
commit b9ffeab7b0
1 changed files with 2 additions and 2 deletions

View File

@ -164,8 +164,8 @@ DpGetShortPdbFileName (
for (IndexA = StartIndex; IndexA < EndIndex; IndexA++) {
UnicodeBuffer[IndexU] = (CHAR16) PdbFileName[IndexA];
IndexU++;
if (IndexU >= DXE_PERFORMANCE_STRING_LENGTH) {
UnicodeBuffer[DXE_PERFORMANCE_STRING_LENGTH] = 0;
if (IndexU >= DP_GAUGE_STRING_LENGTH) {
UnicodeBuffer[DP_GAUGE_STRING_LENGTH] = 0;
break;
}
}