devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Network packets have network byte order

Open AJenbo opened this issue 4 years ago • 3 comments

AJenbo avatar Apr 08 '21 11:04 AJenbo

Now with endian_cast.

Eider-McDuck avatar Apr 22 '21 15:04 Eider-McDuck

Error:

Source/multi.cpp:647:57: error: cannot pass non-trivial object of type 'devilution::int32_net_t' (aka 'endian_int<int, SwapBE>') to variadic function; expected type from format string was 'int' [-Wnon-pod-varargs] app_fatal("Invalid size of game data: %d", gameData->size);

This needs an explicit cast, implicit one doesn't work here.

This is part of the reason I don't like implicit casts :)

glebm avatar Apr 27 '21 03:04 glebm

Looks like if constexpr is not supported on GCC 6 at all

glebm avatar Apr 27 '21 16:04 glebm