forked from EXTERNAL/bareiron
Remove BlockChange from packed structs
pragma pack (push, 1) forces alignment to 1-byte. While reordering the fields does help with memory accesses, it only works if the compiler can ensure 2-byte alignments for this struct.
This commit is contained in:
@@ -172,8 +172,6 @@ extern uint8_t motd_len;
|
||||
|
||||
extern uint16_t client_count;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
typedef struct {
|
||||
short x;
|
||||
short z;
|
||||
@@ -181,6 +179,8 @@ typedef struct {
|
||||
uint8_t block;
|
||||
} BlockChange;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
typedef struct {
|
||||
uint8_t uuid[16];
|
||||
char name[16];
|
||||
|
Reference in New Issue
Block a user