diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 17:24:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 17:24:35 +0300 |
commit | 0561af8232b50071676ae18d5e78ba43b15bff94 (patch) | |
tree | 0d51a5ca7662fbf6f1049a6e6ac81e95d5bbd8e8 /src/net/tmwa/messageout.cpp | |
parent | 38659dbd75d81edbe336d5311a1cd1184d359b7e (diff) | |
download | manaplus-0561af8232b50071676ae18d5e78ba43b15bff94.tar.gz manaplus-0561af8232b50071676ae18d5e78ba43b15bff94.tar.bz2 manaplus-0561af8232b50071676ae18d5e78ba43b15bff94.tar.xz manaplus-0561af8232b50071676ae18d5e78ba43b15bff94.zip |
Fix casting in logging packets.
Diffstat (limited to 'src/net/tmwa/messageout.cpp')
-rw-r--r-- | src/net/tmwa/messageout.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp index a66c1c2b1..f1bc7dd02 100644 --- a/src/net/tmwa/messageout.cpp +++ b/src/net/tmwa/messageout.cpp @@ -57,7 +57,8 @@ void MessageOut::expand(const size_t bytes) void MessageOut::writeInt16(const int16_t value, const char *const str) { - DEBUGLOG2("writeInt16: " + toStringPrint(static_cast<int>(value)), + DEBUGLOG2("writeInt16: " + toStringPrint(static_cast<unsigned int>( + static_cast<uint16_t>(value))), mPos, str); expand(2); #if SDL_BYTEORDER == SDL_BIG_ENDIAN @@ -72,7 +73,8 @@ void MessageOut::writeInt16(const int16_t value, const char *const str) void MessageOut::writeInt32(const int32_t value, const char *const str) { - DEBUGLOG2("writeInt32: " + toStringPrint(value), mPos, str); + DEBUGLOG2("writeInt32: " + toStringPrint(static_cast<unsigned int>(value)), + mPos, str); expand(4); #if SDL_BYTEORDER == SDL_BIG_ENDIAN int32_t swap = SDL_Swap32(value); |