summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorJean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>2016-03-17 00:31:11 +0100
committerJean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>2016-03-17 00:31:11 +0100
commitcf51f9defa8f3baa8e79c817aa4d07289b65690b (patch)
tree1fcfdbfca53bb9352ec948d94fab22876b116dc2 /init.lua
parentc129894942a2695f299ff0bc4c311ad1bcc7759f (diff)
Small simplification
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index ab2727c..857e87d 100644
--- a/init.lua
+++ b/init.lua
@@ -17,7 +17,7 @@ end
function craftguide:get_formspec(stack, pagenum, item, recipe_num, filter, player_name)
local inv_size = datas[player_name].size
local npp, i, s = 8*3, 0, 0
- local pagemax = math.floor((inv_size - 1) / npp + 1)
+ local pagemax = math.ceil(inv_size / npp)
if pagenum > pagemax then pagenum = 1
elseif pagenum == 0 then pagenum = pagemax end