aboutsummaryrefslogtreecommitdiffstats
path: root/util/statistics.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-01-31 12:25:24 +0000
committerMatthew Wild <mwild1@gmail.com>2015-01-31 12:25:24 +0000
commit0817b4dc7ac69021ac709895016266b37ee745be (patch)
treedc4f4861f9ff4c39fb0c037e14ec6db025ef0c39 /util/statistics.lua
parent887c81f09119032163fda9826df0e20d067c03e0 (diff)
parentb242f3c94876f76ee7ccc5719bc1fc02c4bd0787 (diff)
downloadprosody-0817b4dc7ac69021ac709895016266b37ee745be.tar.gz
prosody-0817b4dc7ac69021ac709895016266b37ee745be.zip
Merge 0.10->trunk
Diffstat (limited to 'util/statistics.lua')
-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