summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2020-03-28 01:43:12 -0500
committercheapie <no-email-for-you@example.com>2020-03-28 01:43:12 -0500
commit3c7e4a4f823c4c01ae07e519913fe724c22df0d1 (patch)
tree308eedc9e09d2a05333ac6584e2f509fb5e02911
parent77b4fbe12db947911fcccd82d0da1eef4b68d9b1 (diff)
downloaddigistuff-3c7e4a4f823c4c01ae07e519913fe724c22df0d1.tar
digistuff-3c7e4a4f823c4c01ae07e519913fe724c22df0d1.tar.gz
digistuff-3c7e4a4f823c4c01ae07e519913fe724c22df0d1.tar.bz2
digistuff-3c7e4a4f823c4c01ae07e519913fe724c22df0d1.tar.xz
digistuff-3c7e4a4f823c4c01ae07e519913fe724c22df0d1.zip
Fix crash when writing a card with no description
-rw-r--r--cardreader.lua2
1 files changed, 1 insertions, 1 deletions
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")