diff options
Diffstat (limited to 'src/corelib/io/qresource.cpp')
-rw-r--r-- | src/corelib/io/qresource.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index ab4a7b7..ff1a31f 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -1485,11 +1485,7 @@ uchar *QResourceFileEnginePrivate::map(qint64 offset, qint64 size, QFile::Memory { Q_Q(QResourceFileEngine); Q_UNUSED(flags); - if (!resource.isValid() - || offset < 0 - || size < 0 - || offset + size > resource.size() - || (size == 0)) { + if (offset < 0 || size <= 0 || !resource.isValid() || offset + size > resource.size()) { q->setError(QFile::UnspecifiedError, QString()); return 0; } |