Add check for mailing list nil description (fix #112)

This commit is contained in:
Athozus 2023-10-16 20:36:05 +02:00
parent 80ae9c3342
commit 7754e7e361
No known key found for this signature in database
GPG Key ID: B50895022E8484BF

View File

@ -22,7 +22,7 @@ function mail.show_maillists(name)
formspec[#formspec + 1] = "@" .. minetest.formspec_escape(maillist.name) formspec[#formspec + 1] = "@" .. minetest.formspec_escape(maillist.name)
formspec[#formspec + 1] = "," formspec[#formspec + 1] = ","
if maillist.desc ~= "" then if maillist.desc ~= "" then
if string.len(maillist.desc) > 30 then if string.len(maillist.desc or "") > 30 then
formspec[#formspec + 1] = minetest.formspec_escape(string.sub(maillist.desc, 1, 27)) formspec[#formspec + 1] = minetest.formspec_escape(string.sub(maillist.desc, 1, 27))
formspec[#formspec + 1] = "..." formspec[#formspec + 1] = "..."
else else