Correctly handle the file size when sending a quest.
This commit is contained in:
parent
b579a5bbc3
commit
db3423e208
@ -336,7 +336,8 @@ send_player_card(CSocket, GID, Char) ->
|
|||||||
|
|
||||||
send_quest(CSocket, Filename) ->
|
send_quest(CSocket, Filename) ->
|
||||||
{ok, File} = file:read_file(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).
|
packet_send(CSocket, Packet).
|
||||||
|
|
||||||
%% @doc Send the list of available universes.
|
%% @doc Send the list of available universes.
|
||||||
|
Loading…
Reference in New Issue
Block a user