From 8586bb47193aebecab2f84ff531beaaeaa7bf93c Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 30 Oct 2022 23:59:55 +0100 Subject: [PATCH] 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 --- src/imageformats/raw.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/imageformats/raw.cpp b/src/imageformats/raw.cpp index 261e89c..fba2d8c 100644 --- a/src/imageformats/raw.cpp +++ b/src/imageformats/raw.cpp @@ -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