Parcourir la source

nasty little bug (#853)

Zachary Rice il y a 3 ans
Parent
commit
a62cc52aba
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      detect/location.go

+ 1 - 0
detect/location.go

@@ -22,6 +22,7 @@ func location(fragment Fragment, matchIndex []int) Location {
 	end := matchIndex[1]
 	end := matchIndex[1]
 
 
 	for lineNum, pair := range fragment.newlineIndices {
 	for lineNum, pair := range fragment.newlineIndices {
+		_lineNum = lineNum
 		newLineByteIndex := pair[0]
 		newLineByteIndex := pair[0]
 		if prevNewLine <= start && start < newLineByteIndex {
 		if prevNewLine <= start && start < newLineByteIndex {
 			lineSet = true
 			lineSet = true