From 59498cd5e74500b54a109695d05dbe1d349ba468 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 9 Apr 2007 08:55:05 +0000 Subject: [PATCH] make the edict macros consistent in return type --- include/QF/progs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/QF/progs.h b/include/QF/progs.h index 6802f8f66..356a97399 100644 --- a/include/QF/progs.h +++ b/include/QF/progs.h @@ -245,7 +245,7 @@ void ED_EntityParseFunction (progs_t *pr); #define PR_edicts(p) ((byte *) *(p)->edicts) #define NEXT_EDICT(p,e) ((edict_t *) ((byte *) e + (p)->pr_edict_size)) -#define EDICT_TO_PROG(p,e) ((long) ((byte *) (e) - PR_edicts (p))) +#define EDICT_TO_PROG(p,e) ((pr_int_t)(intptr_t)((byte *)(e) - PR_edicts (p))) #define PROG_TO_EDICT(p,e) ((edict_t *) (PR_edicts (p) + (e))) #define NUM_FOR_BAD_EDICT(p,e) (EDICT_TO_PROG (p, e) / (p)->pr_edict_size) #ifndef PR_PARANOID_PROGS