From b58adc54865eef3e63b6d8f192c4d8cf3eeafc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 9 Mar 2019 12:09:43 +0100 Subject: [PATCH] Use a less restrictive check (some rmaps contain tiles with exceeding image data) --- src/map/rmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/rmap.cpp b/src/map/rmap.cpp index f307b6aa..ed6de641 100644 --- a/src/map/rmap.cpp +++ b/src/map/rmap.cpp @@ -354,7 +354,7 @@ QPixmap RMap::tile(int x, int y) if (stream.readRawData(ba.data() + sizeof(bes), size) != (int)size) return QPixmap(); QByteArray uba = qUncompress(ba); - if (uba.size() != tileSize.width() * tileSize.height()) + if (uba.size() < tileSize.width() * tileSize.height()) return QPixmap(); QImage img((const uchar*)uba.constData(), tileSize.width(), tileSize.height(), QImage::Format_Indexed8);