Skip to content

Commit

Permalink
fix filesize integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuellr authored and mopsalarm committed Apr 4, 2024
1 parent 3fe3ef8 commit 7737523
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/pr0gramm/app/ui/SettingsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ class SettingsFragment : BasePreferenceFragment("SettingsFragment"),

val totalSize = runInterruptible(Dispatchers.IO) {
items.values().sumOf { item ->
item.media.length().toInt() +
item.thumbnail.length().toInt() +
(item.thumbnailFull?.length()?.toInt() ?: 0)
item.media.length() +
item.thumbnail.length() +
(item.thumbnailFull?.length() ?: 0)

}
}
Expand Down

0 comments on commit 7737523

Please sign in to comment.