projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cf3645
)
Formspecs: Remove accidental empty 'quit' field
author
SmallJoker
<mk939@ymail.com>
Tue, 10 Jul 2018 16:27:03 +0000
(18:27 +0200)
committer
SmallJoker
<mk939@ymail.com>
Tue, 10 Jul 2018 16:27:03 +0000
(18:27 +0200)
src/network/serverpackethandler.cpp
patch
|
blob
|
history
diff --git
a/src/network/serverpackethandler.cpp
b/src/network/serverpackethandler.cpp
index 4647bcc042b615c6130afd5868d8b320f41bc973..91caee0bd9ba452049619bff55502569dd9826ba 100644
(file)
--- 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);