]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenC.py
BaseTools:Similar to octal data rectification
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenC.py
index 500a78f0581abd805a2ab68de14b3049a72872de..915ba2e235b09f23c6e8258ed39cc8c861aba020 100644 (file)
@@ -1010,6 +1010,8 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd):
             try:\r
                 if Value.upper().endswith('L'):\r
                     Value = Value[:-1]\r
+                if Value.startswith('0') and not Value.lower().startswith('0x') and len(Value) > 2:\r
+                    Value = Value.lstrip('0')\r
                 ValueNumber = int (Value, 0)\r
             except:\r
                 EdkLogger.error("build", AUTOGEN_ERROR,\r