diff --git a/src/plugins/imageformats/wbmp/qwbmphandler.cpp b/src/plugins/imageformats/wbmp/qwbmphandler.cpp index 0d08422d35b636221edae80f868e078567a41077..5fe8ec9eb61c20125bfe0f63ab406353e21c254e 100644 --- a/src/plugins/imageformats/wbmp/qwbmphandler.cpp +++ b/src/plugins/imageformats/wbmp/qwbmphandler.cpp @@ -244,7 +244,7 @@ bool WBMPReader::canRead(QIODevice *device) WBMPHeader hdr; if (readWBMPHeader(device, &hdr)) { if ((hdr.type == 0) && (hdr.format == 0)) { - qint64 imageSize = hdr.height * ((hdr.width + 7) / 8); + const qint64 imageSize = hdr.height * ((qint64(hdr.width) + 7) / 8); qint64 available = device->bytesAvailable(); device->seek(oldPos); return (imageSize == available);