Skip to content

Commit

Permalink
Merge pull request #4632 from jg1uaa/dos_inc_h
Browse files Browse the repository at this point in the history
replace sOffset (use offsetof)
  • Loading branch information
joncampbell123 authored Nov 26, 2023
2 parents 71c10e2 + 472c43b commit a6047da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/dos_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ static INLINE uint16_t DOS_PackDate(uint16_t year,uint16_t mon,uint16_t day) {


/* Remains some classes used to access certain things */
#define sOffset(s,m) ((char*)&(((s*)NULL)->m)-(char*)NULL)
#define sOffset(s,m) offsetof(s,m)
#define sGet(s,m) GetIt(sizeof(((s *)&pt)->m),(PhysPt)sOffset(s,m))
#define sSave(s,m,val) SaveIt(sizeof(((s *)&pt)->m),(PhysPt)sOffset(s,m),val)

Expand Down

0 comments on commit a6047da

Please sign in to comment.