fix stripping last character if the last line does not end with end-of-line

This commit is contained in:
Radovan Garabík 2015-03-16 15:16:17 +01:00
parent 91f9c1b453
commit fd2239e5aa
1 changed files with 2 additions and 1 deletions

3
grcat
View File

@ -154,7 +154,8 @@ while 1:
line = freadline()
if line == "" :
break
line = line[:-1]
if line[-1] in '\r\n':
line = line[:-1]
clist = []
skip = 0
for pattern in regexplist: