SLikeSoft/SLikeNet

Endianness

Tonyx97 opened this issue · 0 comments

Hi, I just encountered an issues, not sure if it's my fault or not but I will expose it now. The issue I'm having is when defining __BITSTREAM_NATIVE_END to avoid endian swapping, all of the sudden, when I define it in the correct header (defines.h), an assert fails.

image

The callstack is the following.

 	ucrtbased.dll!78b84856()	Unknown
 	ucrtbased.dll![Frames below may be incorrect and/or missing, no symbols loaded for ucrtbased.dll]	Unknown
 	[External Code]	
>	TR III (Online).exe!SLNet::CCRakNetSlidingWindow::Init(unsigned __int64 curTime, unsigned int maxDatagramPayload) Line 53	C++
 	TR III (Online).exe!SLNet::ReliabilityLayer::Reset(bool resetVariables, int mtuSize, bool _useSecurity) Line 426	C++
 	TR III (Online).exe!SLNet::RakPeer::AssignSystemAddressToRemoteSystemList(const SLNet::SystemAddress systemAddress, SLNet::RakPeer::RemoteSystemStruct::ConnectMode connectionMode, SLNet::RakNetSocket2 * incomingRakNetSocket, bool * thisIPConnectedRecently, SLNet::SystemAddress bindingAddress, int incomingMTU, SLNet::RakNetGUID guid, bool useSecurity) Line 3645	C++
 	TR III (Online).exe!SLNet::ProcessOfflineNetworkPacket(SLNet::SystemAddress systemAddress, const char * data, const int length, SLNet::RakPeer * rakPeer, SLNet::RakNetSocket2 * rakNetSocket, bool * isOfflineMessage, unsigned __int64 timeRead) Line 4961	C++
 	TR III (Online).exe!SLNet::ProcessNetworkPacket(const SLNet::SystemAddress systemAddress, const char * data, const int length, SLNet::RakPeer * rakPeer, SLNet::RakNetSocket2 * rakNetSocket, unsigned __int64 timeRead, SLNet::BitStream & updateBitStream) Line 5449	C++
 	TR III (Online).exe!SLNet::RakPeer::RunUpdateCycle(SLNet::BitStream & updateBitStream) Line 5621	C++
 	TR III (Online).exe!SLNet::UpdateNetworkLoop(void * arguments) Line 6376	C++
 	[External Code]	

This is not the only one I get I think, other similar asserts fail as well but this is the main one. Maybe I'm missing something, I'm confused at this point and I'd appreciate any help, thanks.