summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/StrGather.py
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-09-11 03:14:43 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-09-11 03:14:43 +0000
commitfd171542e0aa89ac12a09d79608173f48019b14b (patch)
treeb4e1320ab3bc1cb59355f9fcbc361f84ae0c4f0a /BaseTools/Source/Python/AutoGen/StrGather.py
parentf22911b49e8be58d364f9e21f5af6bd3f0513cf7 (diff)
downloadedk2-fd171542e0aa89ac12a09d79608173f48019b14b.tar.gz
edk2-fd171542e0aa89ac12a09d79608173f48019b14b.tar.bz2
edk2-fd171542e0aa89ac12a09d79608173f48019b14b.zip
Sync basetools' source and binary files with r1707 of the basetools project.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9257 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/StrGather.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/StrGather.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py
index e82ad3a10b..0f644445dc 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, '')