checker: Ensure a flag is found before considering a good response

This commit is contained in:
nemunaire 2024-03-27 21:30:20 +01:00
parent c53140b88e
commit 76606b3c80
1 changed files with 5 additions and 2 deletions

View File

@ -594,8 +594,11 @@ func (e *Exercice) CheckResponse(cksum []byte, respflags map[int]string, respmcq
valid = valid && flag.IsOptionnal()
}
} else {
flag.FoundBy(t)
goodResponses += 1
err := flag.FoundBy(t)
if err == nil {
// err is unicity issue, probably flag already found
goodResponses += 1
}
}
}