From 0c786f6002380ea8fe8ecc459962d91844965a24 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 21 Jul 2007 19:02:47 +0000 Subject: [PATCH] fixed nasty error in the network --- src/engine/client/client.cpp | 2 ++ src/engine/server/server.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index adac193df..56a7f5d90 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -147,6 +147,8 @@ int client_send_msg() { const msg_info *info = msg_get_info(); NETPACKET packet; + mem_zero(&packet, sizeof(NETPACKET)); + packet.client_id = 0; packet.data = info->data; packet.data_size = info->size; diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 87380cfa1..fd4f16faa 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -102,6 +102,8 @@ int server_send_msg(int client_id) { const msg_info *info = msg_get_info(); NETPACKET packet; + mem_zero(&packet, sizeof(NETPACKET)); + packet.client_id = client_id; packet.data = info->data; packet.data_size = info->size;