From 3c7e4a4f823c4c01ae07e519913fe724c22df0d1 Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 28 Mar 2020 01:43:12 -0500 Subject: Fix crash when writing a card with no description --- cardreader.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardreader.lua b/cardreader.lua index 31ff7e4..06a3235 100644 --- a/cardreader.lua +++ b/cardreader.lua @@ -89,7 +89,7 @@ minetest.register_node("digistuff:card_reader",{ meta:set_int("writepending",1) if type(msg.data) ~= "string" then msg.data = tostring(msg.data) end meta:set_string("writedata",string.sub(msg.data,1,256)) - if type(msg.description == "string") then + if type(msg.description) == "string" then meta:set_string("writedescription",string.sub(msg.description,1,64)) else meta:set_string("writedescription","no name") -- cgit v1.2.3