corrupted book fix

master
ac-minetest 2020-11-27 17:16:58 +01:00
parent 5d94e03351
commit e237985e8e
1 changed files with 3 additions and 2 deletions

View File

@ -444,8 +444,9 @@ basic_robot.commands.write_book = function(name,title,text) -- returns itemstack
local data = {}
if title == "" or not title then title = "program book "..minetest.get_gametime() end
data.title = title or ""
data.text = text or ""
if text == "" or not text then text = "empty" end
data.text = text
data.title = title
data.text_len = #data.text
data.page = 1
data.description = title or ""