diff --git a/src/egs_proto.erl b/src/egs_proto.erl index a1d9129..14c36c7 100644 --- a/src/egs_proto.erl +++ b/src/egs_proto.erl @@ -336,7 +336,8 @@ send_player_card(CSocket, GID, Char) -> send_quest(CSocket, Filename) -> {ok, File} = file:read_file(Filename), - Packet = << 16#020e:16, 0:304, 16#00200000:32/unsigned-integer, 16#2032674b:32/unsigned-integer, File/binary >>, + Size = byte_size(File), + Packet = << 16#020e:16, 0:304, Size:32/little-unsigned-integer, 16#2032674b:32/unsigned-integer, File/binary >>, packet_send(CSocket, Packet). %% @doc Send the list of available universes.