diff --git a/src/cmdlib.h b/src/cmdlib.h index 05e515374..b035842cd 100644 --- a/src/cmdlib.h +++ b/src/cmdlib.h @@ -16,7 +16,7 @@ #include // the dec offsetof macro doesnt work very well... -#define myoffsetof(type,identifier) ((size_t)&((type *)1)->identifier - 1) +#define myoffsetof(type,identifier) ((size_t)&((type *)alignof(type))->identifier - alignof(type)) int Q_filelength (FILE *f); bool FileExists (const char *filename);