Diff

util/statistics.lua @ 6571:4a864b6e8963

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 09 Feb 2015 00:48:08 +0100
parent 6562:2b5ced5ca31f
child 6649:99fa40d498cc
line wrap: on
line diff
--- a/util/statistics.lua	Mon Jan 26 15:27:19 2015 +0100
+++ b/util/statistics.lua	Mon Feb 09 00:48:08 2015 +0100
@@ -8,7 +8,7 @@
 	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