Fix nost-pack bounds check to width and height instead of colorCount...

This commit is contained in:
Gary Talent 2017-10-15 21:50:05 -05:00
parent 2554f8b3e1
commit 6d74a3b48e

View File

@ -84,8 +84,8 @@ int run(ClArgs args) {
int colorId = 0; int colorId = 0;
// copy pixels as color ids // copy pixels as color ids
for (int x = 0; x < src.colorCount(); x++) { for (int x = 0; x < src.width(); x++) {
for (int y = 0; y < src.colorCount(); y++) { for (int y = 0; y < src.height(); y++) {
auto destI = pointToIdx(src.width(), x, y); auto destI = pointToIdx(src.width(), x, y);
if (destI <= argTiles * 64) { if (destI <= argTiles * 64) {
auto c = src.pixel(x, y); auto c = src.pixel(x, y);