mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- Fix myoffsetof using misaligned pointer access.
That could be a problem for particularly pedantic platforms.
This commit is contained in:
parent
593e2f7641
commit
4defb6e967
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
#include <stdarg.h>
|
||||
|
||||
// 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);
|
||||
|
|
Loading…
Reference in a new issue