Fix any remaning aliasing rules with propper memcpy wrappers

This commit is contained in:
Francisco Blas (klondike) Izquierdo Riera 2014-12-30 15:37:24 +01:00
parent 1636187e26
commit 700c53e60a
11 changed files with 140 additions and 94 deletions

View file

@ -117,7 +117,7 @@ namespace datagram
compressor.MessageEnd();
int size = compressor.MaxRetrievable ();
uint8_t * buf = msg->GetPayload ();
*(uint32_t *)buf = htobe32 (size); // length
htobe32buf (buf, size); // length
buf += 4;
compressor.Get (buf, size);
memset (buf + 4, 0, 4); // source and destination are zeroes