unions need to be packed

(cherry picked from commit b28d2d355d48efa913aba48be31d7907ea8af45f)

Signed-off-by: Stefan `Sec` Zehl <sec@42.org>
This commit is contained in:
Frank Zschockelt 2012-01-01 21:31:36 +01:00 committed by Stefan `Sec` Zehl
parent 6fcd448040
commit f242c667ab
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ struct packet{
struct exit{
uint8_t reserved[26];
}__attribute__((packed)) exit;
} c;
}__attribute__((packed)) c;
uint16_t crc; //checksum of the packet, automatically generated and verfied by the library
}__attribute__((packed));

View File

@ -61,7 +61,7 @@ struct packet{
uint16_t gameId;
uint8_t reserved[17];
}__attribute__((packed)) join;
}c;
}__attribute__((packed)) c;
uint16_t crc;
}__attribute__((packed));