diff options
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/StrGather.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/StrGather.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py index e82ad3a..0f64444 100644 --- a/BaseTools/Source/Python/AutoGen/StrGather.py +++ b/BaseTools/Source/Python/AutoGen/StrGather.py @@ -171,9 +171,15 @@ def CreateHFileContent(BaseName, UniObjectClass): if Name != None:
Line = ''
if Referenced == True:
- Line = DEFINE_STR + ' ' + Name + ' ' * (ValueStartPtr - len(DEFINE_STR + Name)) + DecToHexStr(Token, 4)
+ if (ValueStartPtr - len(DEFINE_STR + Name)) <= 0:
+ Line = DEFINE_STR + ' ' + Name + ' ' + DecToHexStr(Token, 4)
+ else:
+ Line = DEFINE_STR + ' ' + Name + ' ' * (ValueStartPtr - len(DEFINE_STR + Name)) + DecToHexStr(Token, 4)
else:
- Line = COMMENT_DEFINE_STR + ' ' + Name + ' ' * (ValueStartPtr - len(DEFINE_STR + Name)) + DecToHexStr(Token, 4) + COMMENT_NOT_REFERENCED
+ if (ValueStartPtr - len(DEFINE_STR + Name)) <= 0:
+ Line = COMMENT_DEFINE_STR + ' ' + Name + ' ' + DecToHexStr(Token, 4) + COMMENT_NOT_REFERENCED
+ else:
+ Line = COMMENT_DEFINE_STR + ' ' + Name + ' ' * (ValueStartPtr - len(DEFINE_STR + Name)) + DecToHexStr(Token, 4) + COMMENT_NOT_REFERENCED
Str = WriteLine(Str, Line)
Str = WriteLine(Str, '')
|