1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 13:41:16 +01:00

Fixed broken data size copy

This commit is contained in:
Martin Tůma 2018-03-26 01:02:31 +02:00
parent 35703e3363
commit 820e614921

View File

@ -223,7 +223,7 @@ QPixmap OZF::tile(int zoom, int x, int y)
quint32 bes = qToBigEndian(tileSize().width() * tileSize().height()); quint32 bes = qToBigEndian(tileSize().width() * tileSize().height());
QByteArray ba; QByteArray ba;
ba.resize(sizeof(bes) + size); ba.resize(sizeof(bes) + size);
*(ba.data()) = bes; memcpy(ba.data(), &bes, sizeof(bes));
if (!read(ba.data() + sizeof(bes), size, 16)) if (!read(ba.data() + sizeof(bes), size, 16))
return QPixmap(); return QPixmap();