1
0
Fork 0
mirror of https://github.com/mt-mods/mail.git synced 2025-03-21 17:11:28 +00:00

Add check for mailing list nil description (fix )

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] = ","
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] = "..."
else