diff options
author | Matthew Wild <mwild1@gmail.com> | 2015-01-31 12:25:24 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2015-01-31 12:25:24 +0000 |
commit | 5a748d5a3ce2e861b6eccfa941971a0fcb0ec2c7 (patch) | |
tree | dc4f4861f9ff4c39fb0c037e14ec6db025ef0c39 /util | |
parent | a5b88cba341e0f99461b12d6dd42f54352c4b76a (diff) | |
parent | b51dfa3ecff22733dac5eb72b6d4bafa582e324e (diff) | |
download | prosody-5a748d5a3ce2e861b6eccfa941971a0fcb0ec2c7.tar.gz prosody-5a748d5a3ce2e861b6eccfa941971a0fcb0ec2c7.zip |
Merge 0.10->trunk
Diffstat (limited to 'util')
-rw-r--r-- | util/statistics.lua | 2 |
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 |