summaryrefslogtreecommitdiff
path: root/src/net/tmwa/messageout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/messageout.cpp')
-rw-r--r--src/net/tmwa/messageout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp
index 1a3986412..31196a4a7 100644
--- a/src/net/tmwa/messageout.cpp
+++ b/src/net/tmwa/messageout.cpp
@@ -94,7 +94,8 @@ void MessageOut::writeCoordinates(const uint16_t x,
DEBUGLOG(strprintf("writeCoordinates: %u,%u %u",
static_cast<unsigned>(x), static_cast<unsigned>(y),
static_cast<unsigned>(direction)));
- char *const data = mData + static_cast<size_t>(mPos);
+ unsigned char *const data = reinterpret_cast<unsigned char*>(mData)
+ + static_cast<size_t>(mPos);
mNetwork->mOutSize += 3;
mPos += 3;