X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FAutoGen%2FGenC.py;fp=BaseTools%2FSource%2FPython%2FAutoGen%2FGenC.py;h=f1f3b6f359c55b94b35acafecaa07322a3ce2603;hp=e46942a3e2662be9ebf89b0d485283f9923f0425;hb=94c912950c2f588ab8c3725d7aaa3d7c07aaa995;hpb=30e65c4e196b2d162b648212bf049e9353590997 diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index e46942a3e2..f1f3b6f359 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1010,7 +1010,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): try: if Value.upper().endswith('L'): Value = Value[:-1] - if Value.startswith('0') and not Value.lower().startswith('0x') and len(Value) > 2: + if Value.startswith('0') and not Value.lower().startswith('0x') and len(Value) > 1 and Value.lstrip('0'): Value = Value.lstrip('0') ValueNumber = int (Value, 0) except: