mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-19 23:57:41 +03:00
## Problem - `getBookSize()` calls `getCumulativeSpineItemSize(getSpineItemsCount() - 1)` which passes -1 when spine is empty - `calculateProgress()` then divides by zero when book size is 0 ## Fix - Return 0 from `getBookSize()` if spine is empty - Return 0 from `calculateProgress()` if book size is 0 ## Testing - Builds successfully with `pio run` - Affects: `lib/Epub/Epub.cpp` |
||
|---|---|---|
| .. | ||
| Epub | ||
| Epub.cpp | ||
| Epub.h | ||