aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2018-07-10 18:27:03 +0200
committerSmallJoker <mk939@ymail.com>2018-07-10 18:27:03 +0200
commitf7a8e757655034abf661c0fcb5129b9ddd798a0b (patch)
tree8cbd64848e78a113268237df42e2b063d93d4c7f /src
parent0cf36454d6403982ccc35a92f81c693c97b67cb9 (diff)
downloadminetest-f7a8e757655034abf661c0fcb5129b9ddd798a0b.tar.gz
minetest-f7a8e757655034abf661c0fcb5129b9ddd798a0b.tar.bz2
minetest-f7a8e757655034abf661c0fcb5129b9ddd798a0b.zip
Formspecs: Remove accidental empty 'quit' field
Diffstat (limited to 'src')
-rw-r--r--src/network/serverpackethandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 4647bcc04..91caee0bd 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -1511,7 +1511,8 @@ void Server::handleCommand_InventoryFields(NetworkPacket* pkt)
if (peer_state_iterator != m_formspec_state_data.end()) {
const std::string &server_formspec_name = peer_state_iterator->second;
if (client_formspec_name == server_formspec_name) {
- if (fields["quit"] == "true")
+ auto it = fields.find("quit");
+ if (it != fields.end() && it->second == "true")
m_formspec_state_data.erase(peer_state_iterator);
m_script->on_playerReceiveFields(playersao, client_formspec_name, fields);