mirror of https://github.com/acidanthera/audk.git
Correct the convert hex string to decimal value logic.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16150 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
76d475117d
commit
c609f3d7f9
|
@ -432,9 +432,9 @@ IsKeyOptionVariable (
|
||||||
*OptionNumber = 0;
|
*OptionNumber = 0;
|
||||||
for (Index = 3; Index < 7; Index++) {
|
for (Index = 3; Index < 7; Index++) {
|
||||||
if ((Name[Index] >= L'0') && (Name[Index] <= L'9')) {
|
if ((Name[Index] >= L'0') && (Name[Index] <= L'9')) {
|
||||||
*OptionNumber = *OptionNumber * 10 + Name[Index] - L'0';
|
*OptionNumber = *OptionNumber * 16 + Name[Index] - L'0';
|
||||||
} else if ((Name[Index] >= L'A') && (Name[Index] <= L'F')) {
|
} else if ((Name[Index] >= L'A') && (Name[Index] <= L'F')) {
|
||||||
*OptionNumber = *OptionNumber * 10 + Name[Index] - L'A';
|
*OptionNumber = *OptionNumber * 16 + Name[Index] - L'A' + 10;
|
||||||
} else {
|
} else {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue