diff --git a/src/offlinemap.cpp b/src/offlinemap.cpp index 0f49a01f..d940045d 100644 --- a/src/offlinemap.cpp +++ b/src/offlinemap.cpp @@ -621,7 +621,7 @@ void OfflineMap::drawImage(QPainter *painter, const QRectF &rect) if (!_img || _img->isNull()) painter->fillRect(rect, Qt::white); else { - QRect r(rect.topLeft().toPoint(), rect.size().toSize()); + QRect r(rect.toRect()); painter->drawImage(rect.left(), rect.top(), *_img, r.left(), r.top(), r.width(), r.height()); } diff --git a/src/ozf.cpp b/src/ozf.cpp index 40c81826..5b405ba0 100644 --- a/src/ozf.cpp +++ b/src/ozf.cpp @@ -132,7 +132,7 @@ bool OZF::readTileTable() quint16 x, y; - if (!_file.seek(_file.size() - 4)) + if (!_file.seek(_file.size() - sizeof(offset))) return false; // table offset if (!readValue(offset))