raw: Don't seek back if we were asked to read too much

Otherwise we will return false when LibRaw::derror
calls for eof() when it is actually that we have reached eof
This commit is contained in:
Albert Astals Cid 2022-10-30 23:59:55 +01:00
parent d734f28727
commit 8586bb4719

View File

@ -115,9 +115,6 @@ public:
if (read < 1) {
return 0;
}
if (auto o = read % sz) {
seek(-(sz - o), SEEK_CUR);
}
return read / sz;
}
virtual int eof() override