summaryrefslogtreecommitdiff
path: root/mbrpart.h
diff options
context:
space:
mode:
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2018-05-18 23:44:40 +0200
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2018-05-18 23:44:40 +0200
commit2fb79510f0452e91b72cefa704268a569b9885e9 (patch)
tree0d5bab9cd0e903fe768976a8248c29f2f20c3975 /mbrpart.h
parent5e490b279f313bf2138d99a12f3fbed299d4ac2e (diff)
downloadsgdisk-2fb79510f0452e91b72cefa704268a569b9885e9.tar.gz
Reset struct alignment back to standard after each #pragma pack (n)
When using #pragma pack (n) to change the alignment for a struct to n bytes, it is necessary to reset the alignment to the standard value as otherwise the changed alignment is used throughout the whole program code which causes other structs to become unaligned.
Diffstat (limited to 'mbrpart.h')
-rw-r--r--mbrpart.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mbrpart.h b/mbrpart.h
index f5892e7..0de365f 100644
--- a/mbrpart.h
+++ b/mbrpart.h
@@ -50,6 +50,7 @@ struct MBRRecord {
uint32_t firstLBA; // see above
uint32_t lengthLBA;
}; // struct MBRRecord
+#pragma pack ()
class MBRPart {
protected: