0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-03-22 18:31:27 +00:00

allow NUM_FOR_EDICT to work with a null edict no matter what (hopefully not a

bad thing)
This commit is contained in:
Bill Currie 2001-06-06 00:38:05 +00:00
parent 867260d27d
commit 37661f3cce

View file

@ -1304,8 +1304,8 @@ NUM_FOR_EDICT (progs_t * pr, edict_t *e)
b = (byte *) e - (byte *) * (pr)->edicts;
b = b / pr->pr_edict_size;
if (b < 0 || b >= *(pr)->num_edicts)
PR_Error (pr, "NUM_FOR_EDICT: bad pointer");
if (b && (b < 0 || b >= *(pr)->num_edicts))
PR_Error (pr, "NUM_FOR_EDICT: bad pointer %d %p %p", b, e, * (pr)->edicts);
return b;
}