From 60fd8781620660e88c8c53548d0bdba5fb1dc24e Mon Sep 17 00:00:00 2001 From: jpirnay Date: Sun, 1 Mar 2026 21:30:06 +0100 Subject: [PATCH] Amend xtc logic --- src/activities/boot_sleep/SleepActivity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index 6138bdb2..c1667bad 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -144,7 +144,7 @@ std::string SleepActivity::getBookOverlayText(const std::string& bookPath) const if (Storage.openFileForRead("SLP", xtc.getCachePath() + "/progress.bin", f)) { uint8_t data[4]; if (f.read(data, 4) == 4) { - uint32_t currentPage = data[0] + (data[1] << 8) + (data[2] << 16) + (data[3] << 24); + uint32_t currentPage = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); uint32_t totalPages = xtc.getPageCount(); float progress = xtc.calculateProgress(currentPage) * 100.0f; char progressStr[32];