Skip to content

Commit

Permalink
ECC: fix incomplete comment strip when searching field name in struct.
Browse files Browse the repository at this point in the history
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1285 7335b38e-4728-0410-8992-fb3ffe349368
  • Loading branch information
jlin16 committed Jul 16, 2008
1 parent 9c7855f commit 7216b1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Python/Ecc/c.py
Expand Up @@ -882,8 +882,11 @@ def StripComments(Str):
List = Str.splitlines()
InComment = False
for StrPart in List:
if StrPart.lstrip().startswith('//'):
Index = StrPart.find('//')
if Index != -1 and not InComment:
StrippedStr += StrPart[0:Index]
continue

Index = StrPart.find('/*')
if Index != -1:
InComment = True
Expand Down

0 comments on commit 7216b1a

Please sign in to comment.