diff options
author | Kim Alvefur <zash@zash.se> | 2015-02-09 00:48:08 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-02-09 00:48:08 +0100 |
commit | ca2fda7c2a628983457c836f9e89c2db29eb4f60 (patch) | |
tree | 49e5401cc7a67229f027c050c934149317ef2146 /util | |
parent | 887c81f09119032163fda9826df0e20d067c03e0 (diff) | |
parent | 7c0ead1c91558b669c73affb1e7ef92900c92444 (diff) | |
download | prosody-ca2fda7c2a628983457c836f9e89c2db29eb4f60.tar.gz prosody-ca2fda7c2a628983457c836f9e89c2db29eb4f60.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 |