Fix a compiler warning.

This commit is contained in:
Robin Sommer 2013-06-02 20:03:19 -07:00
parent d3d14e10cf
commit 4494643296
3 changed files with 15 additions and 3 deletions

View file

@ -351,10 +351,12 @@ public:
}
char Type() { return buffer[0]; }
RemoteSerializer::PeerID Peer()
{
// Wow, is this ugly...
return ntohl(*(uint32*)(buffer + 4));
uint32 tmp;
memcpy(&tmp, buffer + 4, sizeof(tmp));
return ntohl(tmp);
}
const char* Raw() { return buffer; }