diff options
Diffstat (limited to 'src/net/tmwa/messagein.cpp')
-rw-r--r-- | src/net/tmwa/messagein.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/tmwa/messagein.cpp b/src/net/tmwa/messagein.cpp index b8bba342f..698d7211c 100644 --- a/src/net/tmwa/messagein.cpp +++ b/src/net/tmwa/messagein.cpp @@ -43,17 +43,17 @@ MessageIn::MessageIn(const char *data, unsigned int length): mId = readInt16(); } -Sint16 MessageIn::readInt16() +int16_t MessageIn::readInt16() { - Sint16 value = -1; + int16_t value = -1; if (mPos + 2 <= mLength) { #if SDL_BYTEORDER == SDL_BIG_ENDIAN - Sint16 swap; - memcpy(&swap, mData + mPos, sizeof(Sint16)); + int16_t swap; + memcpy(&swap, mData + mPos, sizeof(int16_t)); value = SDL_Swap16(swap); #else - memcpy(&value, mData + mPos, sizeof(Sint16)); + memcpy(&value, mData + mPos, sizeof(int16_t)); #endif } mPos += 2; @@ -64,15 +64,15 @@ Sint16 MessageIn::readInt16() int MessageIn::readInt32() { - Sint32 value = -1; + int32_t value = -1; if (mPos + 4 <= mLength) { #if SDL_BYTEORDER == SDL_BIG_ENDIAN - Sint32 swap; - memcpy(&swap, mData + mPos, sizeof(Sint32)); + int32_t swap; + memcpy(&swap, mData + mPos, sizeof(int32_t)); value = SDL_Swap32(swap); #else - memcpy(&value, mData + mPos, sizeof(Sint32)); + memcpy(&value, mData + mPos, sizeof(int32_t)); #endif } mPos += 4; |