View Single Post
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#43)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 13-05-2004

sPlO, instead of putting your checks in pfnIndexOfEntOffset() and the likes, just #undef the INDEXENT and ENTINDEX macros and redefine them with your check included.

If you want to FIX that bug (and not PATCH it), instead of just returning from ENTINDEX when the pointer is NULL, provoke a crash here (by a zero divide, for example). This way when Windows will crash, you can click on "Debug" and the debugger will kick in right at the spot where ENTINDEX was called.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."