Xteink-X4-crosspoint-reader/lib/Epub
IFAKA adfeee063f
Handle empty spine in getBookSize() and calculateProgress() (#67)
## 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`
2025-12-19 23:28:36 +11:00
..
Epub Bugfix/word spacing indented (#59) 2025-12-19 08:45:20 +11:00
Epub.cpp Handle empty spine in getBookSize() and calculateProgress() (#67) 2025-12-19 23:28:36 +11:00
Epub.h Caching of spine item sizes for faster book loading (saves 1-4 seconds). (#54) 2025-12-18 22:49:14 +11:00