LibRaw_QIODevice::seek() avoid seek on a sequential device

This commit is contained in:
Mirco Miranda 2022-09-21 02:14:55 +02:00
parent d881a7bbb1
commit 6f3a326cf8

View File

@ -138,7 +138,7 @@ public:
if (whence == SEEK_END) {
pos = size + o;
}
if (pos < 0 || pos > size) {
if (pos < 0 || pos > size || m_device->isSequential()) {
return -1;
}
return m_device->seek(pos) ? 0 : -1;