diff options
author | Liming Gao <liming.gao@intel.com> | 2018-09-12 15:21:42 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-09-12 15:21:42 +0800 |
commit | ee1e258ab5e0ccc044cfd85424882a38b102150c (patch) | |
tree | 3e642ff06c275c544c8b201412a01a8df9785401 | |
parent | dee835dc0a673eb6ba6691474cb85c5c6f283ae6 (diff) | |
download | edk2-ee1e258ab5e0ccc044cfd85424882a38b102150c.tar.gz |
BaseTool: Fixed the bug of Boolean Hii Pcd packing.
When packing HiiPcd into PcdNvStoreDefaultValueBuffer,
The boolean type pcd value packing incorrect.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
(cherry picked from commit 669b55e6d560f06aef5a21d843451ae3b1351116)
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenVar.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py b/BaseTools/Source/Python/AutoGen/GenVar.py index d222e6ed5e..7165a8bf3b 100644 --- a/BaseTools/Source/Python/AutoGen/GenVar.py +++ b/BaseTools/Source/Python/AutoGen/GenVar.py @@ -322,7 +322,7 @@ class VariableMgr(object): Buffer += pack("=B",int(value_char,16))
data_len += len(tail.split(","))
elif data_type == "BOOLEAN":
- Buffer += pack("=B",True) if var_value.upper() == "TRUE" else pack("=B",False)
+ Buffer += pack("=B",True) if var_value.upper() in ["TRUE","1"] else pack("=B",False)
data_len += 1
elif data_type == "UINT8":
Buffer += pack("=B",GetIntegerValue(var_value))
|