diff options
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenC.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 500a78f058..915ba2e235 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1010,6 +1010,8 @@ 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:
+ Value = Value.lstrip('0')
ValueNumber = int (Value, 0)
except:
EdkLogger.error("build", AUTOGEN_ERROR,
|