summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--img/better_disp.lua2
1 files changed, 1 insertions, 1 deletions
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)