summaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-06 23:39:40 +0100
committerubq323 <ubq323@ubq323.website>2022-08-06 23:39:40 +0100
commit99ad14f19fe9eb1cc8743d6d7ccafcff50f72d96 (patch)
treea30fd6676360e304b7176765a9f5e612b842d09f /img
parentabe3de1df2e7ded241b959f36d6b2e2da3b0ec85 (diff)
img
Diffstat (limited to 'img')
-rw-r--r--img/disp_common.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/img/disp_common.lua b/img/disp_common.lua
index cf67d3a..5648d87 100644
--- a/img/disp_common.lua
+++ b/img/disp_common.lua
@@ -20,6 +20,7 @@ end
local function average_color(pxlist)
local count = #pxlist
+ if count == 0 then return {0,0,0} end
local tr,tg,tb = 0,0,0
for _,px in ipairs(pxlist) do
tr = tr + px[1]