Skip to content

Commit 4d634ef

Browse files
red-001nerzhul
authored andcommittedFeb 25, 2017
Fix crash that can be caused by the shutdown command. (#5292)
1 parent 2d1fca5 commit 4d634ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎builtin/game/chatcommands.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,8 @@ core.register_chatcommand("shutdown", {
842842
core.log("action", name .. " shuts down server")
843843
core.chat_send_all("*** Server shutting down (operator request).")
844844
local reconnect, message = param:match("([^ ]+)(.*)")
845-
core.request_shutdown(message:trim(), minetest.is_yes(reconnect))
845+
message = message or ""
846+
core.request_shutdown(message:trim(), core.is_yes(reconnect))
846847
end,
847848
})
848849

0 commit comments

Comments
 (0)
Please sign in to comment.