From ea223e6993f3ed451a984c4f8aef60be2ea8de42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 21 May 2010 12:40:05 +0200 Subject: [PATCH] proto: Correctly give the file size when sending the zone file. --- src/egs_proto.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egs_proto.erl b/src/egs_proto.erl index ba6da7c..ffee7d4 100644 --- a/src/egs_proto.erl +++ b/src/egs_proto.erl @@ -359,5 +359,6 @@ send_universe_info(CSocket, GID) -> send_zone(CSocket, Filename) -> {ok, File} = file:read_file(Filename), - Packet = << 16#020f:16, 0:336, 16#00700100:32/unsigned-integer, File/binary >>, + Size = byte_size(File), + Packet = << 16#020f:16, 0:336, Size:32/little-unsigned-integer, File/binary >>, packet_send(CSocket, Packet).