diff options
author | red-001 <red-001@outlook.ie> | 2017-02-25 08:28:25 +0000 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-02-25 09:28:25 +0100 |
commit | 4d634ef675020964413020f6215529670af0091a (patch) | |
tree | 6aa9d1eb0ea5aa29eaa837474a4717dccab7b267 /builtin/game | |
parent | 2d1fca51e975a01f84fa3fd9b266435316fbe548 (diff) | |
download | minetest-4d634ef675020964413020f6215529670af0091a.tar.gz minetest-4d634ef675020964413020f6215529670af0091a.tar.bz2 minetest-4d634ef675020964413020f6215529670af0091a.zip |
Fix crash that can be caused by the shutdown command. (#5292)
Diffstat (limited to 'builtin/game')
-rw-r--r-- | builtin/game/chatcommands.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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, }) |