mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
cppcheck fix
This commit is contained in:
parent
17c20db930
commit
2a94648828
@ -257,7 +257,7 @@ void EpubReaderActivity::jumpToPercent(int percent) {
|
||||
size_t targetSize =
|
||||
(bookSize / 100) * static_cast<size_t>(percent) +
|
||||
(bookSize % 100) * static_cast<size_t>(percent) / 100;
|
||||
if (percent >= 100 && bookSize > 0) {
|
||||
if (percent >= 100) {
|
||||
// Ensure the final percent lands inside the last spine item.
|
||||
targetSize = bookSize - 1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user