diff options
Diffstat (limited to 'coverage/lcovreport.py')
-rw-r--r-- | coverage/lcovreport.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/coverage/lcovreport.py b/coverage/lcovreport.py index 8e3a5768..3da164d5 100644 --- a/coverage/lcovreport.py +++ b/coverage/lcovreport.py @@ -74,6 +74,8 @@ class LcovReporter: # characters of the encoding ("==") are removed from the hash to # allow genhtml to run on the resulting lcov file. if source_lines: + if covered-1 >= len(source_lines): + break line = source_lines[covered-1] else: line = "" |