aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/statistics.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/statistics.lua b/util/statistics.lua
index 08c765ae..a05a1f91 100644
--- a/util/statistics.lua
+++ b/util/statistics.lua
@@ -8,7 +8,7 @@ local function percentile(arr, length, pc)
local n = pc/100 * (length + 1);
local k, d = m_floor(n), n%1;
if k == 0 then
- return arr[1];
+ return arr[1] or 0;
elseif k >= length then
return arr[length];
end