summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-06 23:06:28 +0100
committerubq323 <ubq323@ubq323.website>2022-08-06 23:06:28 +0100
commit10d61e714d2cdea43edd1af18df0be944829df30 (patch)
tree2b9bd145558be62685dede1c87e25c4502a926ee
parent541f7a16cac905749ac24836ddf4df99b8405d94 (diff)
img
-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)