Skip to content

Commit

Permalink
fix: remove unnecesary panic when comparing achievements size (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisMayo committed Apr 20, 2024
1 parent b5e4372 commit 25b12b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/user_stats/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ impl<M> AchievementHelper<'_, M> {
if !sys::SteamAPI_ISteamUtils_GetImageSize(utils, img, &mut width, &mut height) {
return None;
}
assert_eq!(width, 64);
assert_eq!(height, 64);
if width != 64 || height != 64 {
return None;
}
let mut dest = vec![0; 64 * 64 * 4];
if !sys::SteamAPI_ISteamUtils_GetImageRGBA(utils, img, dest.as_mut_ptr(), 64 * 64 * 4) {
return None;
Expand Down

0 comments on commit 25b12b8

Please sign in to comment.