Adjust nost-pack image data buffer size

This commit is contained in:
Gary Talent 2017-04-13 05:46:10 -05:00
parent 7ddfc0639b
commit 552838c323

View File

@ -67,7 +67,7 @@ int run(ClArgs args) {
if (!src.isNull()) { if (!src.isNull()) {
QMap<QRgb, int> colors; QMap<QRgb, int> colors;
const auto imgDataBuffSize = sizeof(Pallete) - 1 + src.width() * src.height(); const auto imgDataBuffSize = sizeof(Pallete) + src.width() * src.height();
uint8_t imgDataBuff[imgDataBuffSize]; uint8_t imgDataBuff[imgDataBuffSize];
GbaImageData *id = (GbaImageData*) imgDataBuff; GbaImageData *id = (GbaImageData*) imgDataBuff;
int colorId = 0; int colorId = 0;