From 6d74a3b48eea1744aeb553b4c9b5c0446d239a4c Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 15 Oct 2017 21:50:05 -0500 Subject: [PATCH] Fix nost-pack bounds check to width and height instead of colorCount... --- src/nostalgia/tools/pack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nostalgia/tools/pack.cpp b/src/nostalgia/tools/pack.cpp index ee2c1334..40969c2f 100644 --- a/src/nostalgia/tools/pack.cpp +++ b/src/nostalgia/tools/pack.cpp @@ -84,8 +84,8 @@ int run(ClArgs args) { int colorId = 0; // copy pixels as color ids - for (int x = 0; x < src.colorCount(); x++) { - for (int y = 0; y < src.colorCount(); y++) { + for (int x = 0; x < src.width(); x++) { + for (int y = 0; y < src.height(); y++) { auto destI = pointToIdx(src.width(), x, y); if (destI <= argTiles * 64) { auto c = src.pixel(x, y);