summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJP Guerrero <jeanpatrick.guerrero@gmail.com>2016-12-13 18:17:51 +0100
committerJP Guerrero <jeanpatrick.guerrero@gmail.com>2016-12-13 18:17:51 +0100
commit25f4b5d3f16d9c7b9e7458deddafc3e586cde9bf (patch)
treec4bc54f2844fe43807b5fe292bbacc2bcb628771
parenta74de97c876d064d024f716e9d5e41c70b800ded (diff)
Fix minor error
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index d5c687e..15b1769 100644
--- a/init.lua
+++ b/init.lua
@@ -230,8 +230,8 @@ function craftguide:get_items(player_name)
table.sort(items_list)
data.items = items_list
- data.size = list_size
- data.pagemax = max(1, ceil(list_size / ipp))
+ data.size = list_size or 0
+ data.pagemax = max(1, ceil(data.size / ipp))
end
minetest.register_on_player_receive_fields(function(player, formname, fields)