Fix past end of string bug in Python first line hack.

This commit is contained in:
Jim Hague 2012-03-04 21:44:31 +00:00
parent ef8a7b1703
commit 2dd673e4d3
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ def process(inf):
for line in inf:
line = line.strip()
start = line[:2]
if start[0] != "|" and start[1] == ":":
if len(start) > 1 and start[0] != "|" and start[1] == ":":
if start[0] in ["M", "K", "L"]:
print line
elif start[0] != "%":