diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-21 19:02:47 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-07-21 19:02:47 +0000 |
| commit | 0c786f6002380ea8fe8ecc459962d91844965a24 (patch) | |
| tree | 31990e83da686ee82cdeb0c5e2495437e4f23fa7 /src/engine | |
| parent | 4378e3e4e8104fe54f970b96b8254e02a06f65bb (diff) | |
| download | zcatch-0c786f6002380ea8fe8ecc459962d91844965a24.tar.gz zcatch-0c786f6002380ea8fe8ecc459962d91844965a24.zip | |
fixed nasty error in the network
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/client/client.cpp | 2 | ||||
| -rw-r--r-- | src/engine/server/server.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index adac193d..56a7f5d9 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 87380cfa..fd4f16fa 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; |