From 10d61e714d2cdea43edd1af18df0be944829df30 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 6 Aug 2022 23:06:28 +0100 Subject: img --- img/better_disp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'img') diff --git a/img/better_disp.lua b/img/better_disp.lua index 0c94be0..4ded7fd 100644 --- a/img/better_disp.lua +++ b/img/better_disp.lua @@ -62,8 +62,8 @@ local function adjust_to_2_colors(R,gromlings,pdists) local all_current_colors = {} local ncolors = 0 for _,cidx in ipairs(gromling_colors) do + if not all_current_colors[cidx] then ncolors = ncolors + 1 end all_current_colors[cidx] = true - ncolors = ncolors+1 end print(ncolors) -- cgit v1.2.3