diff --git a/src/mkv_wrap.cpp b/src/mkv_wrap.cpp index ae65df1e5..4bab6d9b1 100644 --- a/src/mkv_wrap.cpp +++ b/src/mkv_wrap.cpp @@ -62,7 +62,7 @@ struct MkvStdIO final : InputStream { static int Read(InputStream *st, uint64_t pos, void *buffer, int count) { auto *self = static_cast(st); - if (pos == self->file.size()) + if (pos >= self->file.size()) return 0; auto remaining = self->file.size() - pos;