Skip to content

Commit

Permalink
Merge pull request #38 from bgokden/refactor
Browse files Browse the repository at this point in the history
Added a limit to hist calculation
  • Loading branch information
bgokden authored Jul 2, 2021
2 parents 2eeea03 + 2959603 commit 31c5041
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ func (dt *Data) Process(force bool) error {
if index >= 64 {
index = 63
}
if index <= 0 {
index = 0 // this is probably related to a bug
}
hist[index] += histUnit
}
}
Expand Down

0 comments on commit 31c5041

Please sign in to comment.