diff options
author | SmallJoker <mk939@ymail.com> | 2018-05-26 12:50:44 +0200 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-05-26 12:50:44 +0200 |
commit | bb4f0fd2285de8b8fd578706dd5287ee1dbb9b93 (patch) | |
tree | 4ede909f51ae563e76bbe0f2753efba27e1e2167 /src/network | |
parent | 5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968 (diff) | |
download | minetest-bb4f0fd2285de8b8fd578706dd5287ee1dbb9b93.tar.gz minetest-bb4f0fd2285de8b8fd578706dd5287ee1dbb9b93.tar.bz2 minetest-bb4f0fd2285de8b8fd578706dd5287ee1dbb9b93.zip |
Formspec verification: Fix show_formspec inside callbacks (#7374)
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/serverpackethandler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 2d810836b..c961d406e 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -1514,9 +1514,10 @@ 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) { - m_script->on_playerReceiveFields(playersao, client_formspec_name, fields); if (fields["quit"] == "true") m_formspec_state_data.erase(peer_state_iterator); + + m_script->on_playerReceiveFields(playersao, client_formspec_name, fields); return; } actionstream << "'" << player->getName() |