Skip to content

Commit

Permalink
use first match
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalpharush committed Jun 26, 2024
1 parent fe1406f commit a5277cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fuzzing/corpus/corpus.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (c *Corpus) initializeSequences(sequenceFiles *corpusDirectory[calls.CallSe
// If the filename is a timestamp as expected, use it as a weight for the mutation chooser.
re := regexp.MustCompile("[0-9]+")
var weight *big.Int
if filename := re.FindAllString(sequenceFileData.fileName, 0); filename != nil {
if filename := re.FindAllString(sequenceFileData.fileName, 1); filename != nil {
if timestamp, err := strconv.ParseUint(filename[0], 10, 64); err != nil {
weight = new(big.Int).SetUint64(timestamp)
}
Expand Down

0 comments on commit a5277cd

Please sign in to comment.