mirror of https://github.com/acidanthera/audk.git
there is no 0 between a SMBIOS buffer and the first string in unformated area. So no need + 1.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9555 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7b9b2b920e
commit
ed79462bee
|
@ -749,7 +749,7 @@ UpdateFrontPageStrings (
|
||||||
if (Record->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) {
|
if (Record->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) {
|
||||||
Type0Record = (SMBIOS_TABLE_TYPE0 *) Record;
|
Type0Record = (SMBIOS_TABLE_TYPE0 *) Record;
|
||||||
StrIndex = Type0Record->BiosVersion;
|
StrIndex = Type0Record->BiosVersion;
|
||||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record + Type0Record->Hdr.Length + 1), StrIndex, &NewString);
|
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record + Type0Record->Hdr.Length), StrIndex, &NewString);
|
||||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
|
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
|
||||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||||
FreePool (NewString);
|
FreePool (NewString);
|
||||||
|
@ -759,7 +759,7 @@ UpdateFrontPageStrings (
|
||||||
if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) {
|
if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) {
|
||||||
Type1Record = (SMBIOS_TABLE_TYPE1 *) Record;
|
Type1Record = (SMBIOS_TABLE_TYPE1 *) Record;
|
||||||
StrIndex = Type1Record->ProductName;
|
StrIndex = Type1Record->ProductName;
|
||||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record + Type1Record->Hdr.Length + 1), StrIndex, &NewString);
|
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record + Type1Record->Hdr.Length), StrIndex, &NewString);
|
||||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
|
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
|
||||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||||
FreePool (NewString);
|
FreePool (NewString);
|
||||||
|
@ -769,7 +769,7 @@ UpdateFrontPageStrings (
|
||||||
if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
|
if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
|
||||||
Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
|
Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
|
||||||
StrIndex = Type4Record->ProcessorVersion;
|
StrIndex = Type4Record->ProcessorVersion;
|
||||||
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record + Type4Record->Hdr.Length + 1), StrIndex, &NewString);
|
GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record + Type4Record->Hdr.Length), StrIndex, &NewString);
|
||||||
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_MODEL);
|
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_MODEL);
|
||||||
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
|
||||||
FreePool (NewString);
|
FreePool (NewString);
|
||||||
|
|
Loading…
Reference in New Issue