aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/meta_functions.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lualib/meta_functions.lua')
-rw-r--r--lualib/meta_functions.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lualib/meta_functions.lua b/lualib/meta_functions.lua
index 1394204c1..1c6d2cc2b 100644
--- a/lualib/meta_functions.lua
+++ b/lualib/meta_functions.lua
@@ -255,8 +255,14 @@ local function meta_words_function(task)
short_words,
ret_len,
}
+
+ local divisor = 1.0
+ if #tp > 0 then
+ divisor = tp
+ end
+
for _,wr in ipairs(wres) do
- table.insert(ret, wr / #tp)
+ table.insert(ret, wr / divisor)
end
return ret