Skip to content

Commit

Permalink
Fix crash that can be caused by the shutdown command. (#5292)
Browse files Browse the repository at this point in the history
  • Loading branch information
red-001 authored and nerzhul committed Feb 25, 2017
1 parent 2d1fca5 commit 4d634ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/game/chatcommands.lua
Expand Up @@ -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,
})

Expand Down

0 comments on commit 4d634ef

Please sign in to comment.