summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-08-10 16:12:26 +0800
committerLiming Gao <liming.gao@intel.com>2018-08-16 08:32:57 +0800
commit669b55e6d560f06aef5a21d843451ae3b1351116 (patch)
tree88de7f22baa35df43fdfab3bed7bab86ce9527e8 /BaseTools
parentcb5f4f45ce1fca390b99dae5c42b9c4c8b53deea (diff)
downloadedk2-669b55e6d560f06aef5a21d843451ae3b1351116.tar.gz
edk2-669b55e6d560f06aef5a21d843451ae3b1351116.tar.bz2
edk2-669b55e6d560f06aef5a21d843451ae3b1351116.zip
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>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/AutoGen/GenVar.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenVar.py b/BaseTools/Source/Python/AutoGen/GenVar.py
index 8a73c04367..75d455b407 100644
--- a/BaseTools/Source/Python/AutoGen/GenVar.py
+++ b/BaseTools/Source/Python/AutoGen/GenVar.py
@@ -296,7 +296,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 == DataType.TAB_UINT8:
Buffer += pack("=B", GetIntegerValue(var_value))