Fix bug in opening incorrect file in BookMetadataCache
This commit is contained in:
parent
75fd818c93
commit
a600c1626a
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <Print.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@ -297,11 +297,8 @@ BookMetadataCache::TocEntry BookMetadataCache::getTocEntry(const int index) {
|
||||
bookFile.seek(lutOffset + sizeof(size_t) * spineCount + sizeof(size_t) * index);
|
||||
size_t tocEntryPos;
|
||||
serialization::readPod(bookFile, tocEntryPos);
|
||||
|
||||
Serial.printf("[%lu] [BMC] getTocEntry tocEntryPos: %d\n", millis(), tocEntryPos);
|
||||
|
||||
bookFile.seek(tocEntryPos);
|
||||
return readTocEntry(tocFile);
|
||||
return readTocEntry(bookFile);
|
||||
}
|
||||
|
||||
BookMetadataCache::SpineEntry BookMetadataCache::readSpineEntry(File& file) const {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user