[#5] Fix loop condition in countInstructions

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
Ekaterina Lebedeva 2023-08-16 17:57:10 +03:00
parent 66bd0dc9d6
commit dc3d5566cd

View file

@ -86,7 +86,7 @@ func isValidDocument(iDocToCheck int, docs []int) bool {
// countInstructions finds for every instruction a corresponding sequence point and sets IsCovered flag to true.
func countInstructions(cov []coverline, codes []InstrHash) {
for i := 0; i < len(cov); i++ {
for i := range cov {
for _, code := range codes {
if code.Offset == cov[i].Opcode {
cov[i].IsCovered = true