From 808bbb26a21ff84f3b196c97bceeae5444086fd9 Mon Sep 17 00:00:00 2001 From: Mefiresu <15063879+Mefiresu@users.noreply.github.com> Date: Fri, 12 Sep 2025 20:06:48 +0200 Subject: [PATCH] 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. --- include/globals.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/globals.h b/include/globals.h index 1f00086..eafcf20 100644 --- a/include/globals.h +++ b/include/globals.h @@ -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];