diff --git a/source/snes9x/snapshot.cpp b/source/snes9x/snapshot.cpp index e53e080..4a78cab 100644 --- a/source/snes9x/snapshot.cpp +++ b/source/snes9x/snapshot.cpp @@ -48,7 +48,7 @@ enum }; #define COUNT(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY[0])) -#define Offset(field, structure) ((int) (((char *) (&(((structure) NULL)->field))) - ((char *) NULL))) +#define Offset(field, structure) ((int) (((char *) (&(((structure) 1)->field))) - ((char *) 1))) #define OFFSET(f) Offset(f, STRUCT *) #define DUMMY(f) Offset(f, struct Obsolete *) #define DELETED(f) (-1)