mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Use a less restrictive check
(some rmaps contain tiles with exceeding image data)
This commit is contained in:
parent
46d6fbe5de
commit
b58adc5486
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user