From 4d634ef675020964413020f6215529670af0091a Mon Sep 17 00:00:00 2001 From: red-001 Date: Sat, 25 Feb 2017 08:28:25 +0000 Subject: Fix crash that can be caused by the shutdown command. (#5292) --- builtin/game/chatcommands.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin/game') diff --git a/builtin/game/chatcommands.lua b/builtin/game/chatcommands.lua index 54cd6c325..5d5955972 100644 --- a/builtin/game/chatcommands.lua +++ b/builtin/game/chatcommands.lua @@ -842,7 +842,8 @@ core.register_chatcommand("shutdown", { core.log("action", name .. " shuts down server") core.chat_send_all("*** Server shutting down (operator request).") local reconnect, message = param:match("([^ ]+)(.*)") - core.request_shutdown(message:trim(), minetest.is_yes(reconnect)) + message = message or "" + core.request_shutdown(message:trim(), core.is_yes(reconnect)) end, }) -- cgit v1.2.3