projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge 0.10->trunk
[prosody.git]
/
util
/
statistics.lua
diff --git
a/util/statistics.lua
b/util/statistics.lua
index 08c765ae43785214509bfed2a987f98e976ffe2a..a05a1f9185d508ebf2b091e2b6e87b66b1fba849 100644
(file)
--- 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