diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client.cpp b/src/client.cpp index fe1669ddd..cede0af86 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -510,10 +510,13 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) assert(player != NULL); player->setPosition(playerpos_f); } - - // Get map seed - m_map_seed = readU64(&data[2+1+6]); - dstream<<"Client: received map seed: "<<m_map_seed<<std::endl; + + if(datasize >= 2+1+6+8) + { + // Get map seed + m_map_seed = readU64(&data[2+1+6]); + dstream<<"Client: received map seed: "<<m_map_seed<<std::endl; + } // Reply to server u32 replysize = 2; |