]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenC.py
Sync BaseTools Trunk (version r2387) to EDKII main trunk.
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenC.py
index f733ac3e8d03e25b8718aa3fb0614e35d9b11b1b..c6b65f49245f46b0b1e611a660cbb8793352b0db 100644 (file)
@@ -956,6 +956,14 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
         Value = Pcd.DefaultValue
         Unicode = False
         ValueNumber = 0
+
+        if Pcd.DatumType == 'BOOLEAN':
+            BoolValue = Value.upper()
+            if BoolValue == 'TRUE':
+                Value = 1
+            elif BoolValue == 'FALSE':
+                Value = 0
+
         if Pcd.DatumType in ['UINT64', 'UINT32', 'UINT16', 'UINT8']:
             try:
                 if Value.upper().startswith('0X'):