summaryrefslogtreecommitdiff
path: root/src/tangara/audio/playlist.cpp
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-07-22 15:54:44 +1000
committerailurux <ailuruxx@gmail.com>2024-07-22 15:54:44 +1000
commit6f98eaf85e9ab9d6251c0cf12807b04a6674767d (patch)
treedc93768c4646e782fd62ebdafcfe1beca2b9b8d1 /src/tangara/audio/playlist.cpp
parent496baefe663795a030f528853c377c158af357a7 (diff)
downloadtangara-fw-6f98eaf85e9ab9d6251c0cf12807b04a6674767d.tar.gz
Fix off by one error
Diffstat (limited to 'src/tangara/audio/playlist.cpp')
-rw-r--r--src/tangara/audio/playlist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tangara/audio/playlist.cpp b/src/tangara/audio/playlist.cpp
index dcb9bfb7..506e473f 100644
--- a/src/tangara/audio/playlist.cpp
+++ b/src/tangara/audio/playlist.cpp
@@ -92,7 +92,7 @@ auto Playlist::skipTo(size_t position) -> void {
pos_ = position;
auto remainder = position % sample_size_;
auto quotient = (position - remainder) / sample_size_;
- if (offset_cache_.size() < quotient) {
+ if (offset_cache_.size() <= quotient) {
// Fall back case
ESP_LOGW(kTag, "File offset cache failed, falling back...");
f_rewind(&file_);