Skip to content

Commit

Permalink
fix endianess for game seed
Browse files Browse the repository at this point in the history
  • Loading branch information
val-andrushko committed Apr 4, 2018
1 parent 5a5d498 commit 2d9539c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OrionUO/Managers/ConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void CConnectionManager::Init()
if (LPHOSTENT lphost = gethostbyname(hostName))
{
WISP_DATASTREAM::CDataWritter stream;
stream.WriteUInt32BE(((LPIN_ADDR)lphost->h_addr)->s_addr);
stream.WriteUInt32LE(((LPIN_ADDR)lphost->h_addr)->s_addr);
UCHAR_LIST &data = stream.Data();

memcpy(&m_Seed[0], &data[0], 4);
Expand Down Expand Up @@ -133,6 +133,7 @@ void CConnectionManager::Init(puchar gameSeed)
}
//----------------------------------------------------------------------------------
void CConnectionManager::SendIP(CSocket &socket, puchar seed)

{
WISPFUN_DEBUG("c139_f10");
g_PluginManager.WindowProc(g_OrionWindow.Handle, UOMSG_IP_SEND, (WPARAM)seed, 4);
Expand Down

0 comments on commit 2d9539c

Please sign in to comment.