Skip to content

Commit

Permalink
games bugfix
Browse files Browse the repository at this point in the history
fixed bug in games endpoint that returned all games as 0% complete
  • Loading branch information
Jason Clemons committed Sep 12, 2013
1 parent fdcfa9d commit 23f89bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/2.0/includes/classes/api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public function fetch_games($gamertag, $region)
$games['achievements']['current'] = $games['achievements']['current'] + $games['games'][$i]['achievements']['current'];
$games['achievements']['total'] = $games['achievements']['total'] + $games['games'][$i]['achievements']['total'];

if ($game['Progress'][$g]['Achievements'] !== 0 && $games['games'][$i]['isapp'] !== false) {
if ($game['Progress'][$g]['Achievements'] !== 0) {
$games['games'][$i]['progress'] = round((($game['Progress'][$g]['Achievements'] / $game['PossibleAchievements']) * 100), 1);
}

Expand Down

0 comments on commit 23f89bd

Please sign in to comment.