1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

More fixes on image loader

This commit is contained in:
nordsoft
2022-11-19 00:01:48 +04:00
parent 3a913140fd
commit 7bac01f10a

View File

@@ -450,10 +450,10 @@ void ImageLoader::init(QPoint SpriteSize, QPoint Margins, QPoint FullSize)
margins = Margins; margins = Margins;
fullSize = FullSize; fullSize = FullSize;
memset((void *)image->bits(), 0, fullSize.y() * fullSize.x()); memset((void *)image->bits(), 0, fullSize.y() * image->bytesPerLine());
lineStart = image->bits(); lineStart = image->bits();
lineStart += margins.y() * fullSize.x() + margins.x(); lineStart += margins.y() * image->bytesPerLine + margins.x();
position = lineStart; position = lineStart;
} }