Skip to content

Commit

Permalink
handle line "-1" case (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaztec committed Mar 18, 2024
1 parent ac03593 commit 8f24943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/SourceReportParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ object SourceReportParser {
val lineHits = arrayOfNulls<Int>(lines.size)

cov.forEach { (line, hits) ->
if (line < lines.size) {
if (line >=0 && line < lines.size) {
lineHits[line] = hits
} else {
logger.debug("skipping invalid line $line, (total ${lines.size})")
Expand Down

0 comments on commit 8f24943

Please sign in to comment.