Skip to content

Commit

Permalink
Fix steam progress (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
XDoubleU authored Jan 6, 2025
1 parent 1e30260 commit c280cca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/helper/achievementsgrapher.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (grapher *AchievementsGrapher) addDays(dateStr string) {
grapher.dateStrings = append(grapher.dateStrings, dateStr)
grapher.achievementsPerGamePerDay = append(
grapher.achievementsPerGamePerDay,
map[int]int{},
make(map[int]int),
)
return
}
Expand Down Expand Up @@ -112,6 +112,10 @@ func copyMap(original map[int]int) map[int]int {

func (grapher *AchievementsGrapher) updateDays(dateIndex int, gameID int) {
for i := dateIndex; i < len(grapher.dateStrings); i++ {
if _, ok := grapher.achievementsPerGamePerDay[i][gameID]; !ok {
grapher.achievementsPerGamePerDay[i][gameID] = 0
}

grapher.achievementsPerGamePerDay[i][gameID]++
}
}
Expand Down

0 comments on commit c280cca

Please sign in to comment.