Finn Thain <fth...@telegraphics.com.au> writes: > @@ -21,7 +22,9 @@ OSErr SerGetBuf(short refNum, long *count) > > res = PBStatusSync((ParmBlkPtr)¶m); > > - *count = *(long*)param.csParam; > + p = (((unsigned)param.csParam[0] & 0xFFFF) << 16) + > + (((unsigned)param.csParam[1] & 0xFFFF) << 0); > + *count = *(long *)p;
This now dereferences too much. > @@ -83,7 +83,8 @@ static inline OSErr GetCurrentMode(short refNum, > VDSwitchInfoRec *hwMode) > > param.csCode = cscGetCurMode; > param.ioCRefNum = refNum; > - *((VDSwitchInfoRec **)¶m.csParam[0]) = hwMode; > + param.csParam[0] = (*(unsigned long *)hwMode >> 16) & 0xFFFF; > + param.csParam[1] = (*(unsigned long *)hwMode >> 0) & 0xFFFF; Likewise. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/m2fwgoovb1....@igel.home