mirror of https://github.com/odrling/Aegisub
Return zero bytes when MatroskaFile asks for data past the end of the file
This commit is contained in:
parent
53f02d33a6
commit
5f4d6ad386
|
@ -62,7 +62,7 @@ struct MkvStdIO final : InputStream {
|
||||||
|
|
||||||
static int Read(InputStream *st, uint64_t pos, void *buffer, int count) {
|
static int Read(InputStream *st, uint64_t pos, void *buffer, int count) {
|
||||||
auto *self = static_cast<MkvStdIO*>(st);
|
auto *self = static_cast<MkvStdIO*>(st);
|
||||||
if (pos == self->file.size())
|
if (pos >= self->file.size())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto remaining = self->file.size() - pos;
|
auto remaining = self->file.size() - pos;
|
||||||
|
|
Loading…
Reference in New Issue