Return to ignore
authorest31 <MTest31@outlook.com>
Wed, 24 Jun 2015 20:45:52 +0000 (22:45 +0200)
committerest31 <MTest31@outlook.com>
Wed, 24 Jun 2015 20:47:41 +0000 (22:47 +0200)
src/client.cpp
src/server.cpp

index de813187574ddba26ca117e42467d074e98f37dc..d2ec7017e74d0b2edb3fbd3515046481207ae16a 100644 (file)
@@ -880,6 +880,7 @@ void Client::ProcessData(NetworkPacket *pkt)
        if (command >= TOCLIENT_NUM_MSG_TYPES) {
                infostream << "Client: Ignoring unknown command "
                        << command << std::endl;
+               return;
        }
 
        /*
index 52bc9867a0978e918077071f2627e2be2cee5407..0e3d94fae6cd82ae7e1e1568d68fad0854ded370 100644 (file)
@@ -1206,6 +1206,7 @@ void Server::ProcessData(NetworkPacket *pkt)
                if (command >= TOSERVER_NUM_MSG_TYPES) {
                        infostream << "Server: Ignoring unknown command "
                                         << command << std::endl;
+                       return;
                }
 
                if (toServerCommandTable[command].state == TOSERVER_STATE_NOT_CONNECTED) {