diff options
author | Eric Dong <eric.dong@intel.com> | 2014-09-22 05:37:16 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-09-22 05:37:16 +0000 |
commit | c609f3d7f9eddd9d1bfe0d0e1a41f1deda5593bc (patch) | |
tree | f97692e7184303fa84c13e7c8684959d21a22242 /IntelFrameworkModulePkg/Universal | |
parent | 76d475117dfa86d54cea393f00779301b318ff88 (diff) | |
download | edk2-platforms-c609f3d7f9eddd9d1bfe0d0e1a41f1deda5593bc.tar.xz |
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
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c index 63de0d5f57..e061991ea2 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c @@ -432,9 +432,9 @@ IsKeyOptionVariable ( *OptionNumber = 0;
for (Index = 3; Index < 7; Index++) {
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')) {
- *OptionNumber = *OptionNumber * 10 + Name[Index] - L'A';
+ *OptionNumber = *OptionNumber * 16 + Name[Index] - L'A' + 10;
} else {
return FALSE;
}
|