From: havoc Date: Mon, 4 Oct 2004 14:04:05 +0000 (+0000) Subject: NUM_FOR_EDICT now casts to int so that it never returns a 64bit integer on 64bit... X-Git-Tag: xonotic-v0.1.0preview~5531 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9976ca010e51f14b9dfe4c5bc1f945344d3d9bf7;p=xonotic%2Fdarkplaces.git NUM_FOR_EDICT now casts to int so that it never returns a 64bit integer on 64bit compiles which sometimes end up getting passed to printf with the wrong format... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4586 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/progs.h b/progs.h index b1578120..6992e5cb 100644 --- a/progs.h +++ b/progs.h @@ -181,7 +181,7 @@ edict_t *EDICT_NUM_ERROR(int n, char *filename, int fileline); #define EDICT_NUM_UNSIGNED(n) (((n) < sv.max_edicts) ? sv.edicts + (n) : EDICT_NUM_ERROR(n, __FILE__, __LINE__)) //int NUM_FOR_EDICT_ERROR(edict_t *e); -#define NUM_FOR_EDICT(e) ((edict_t *)(e) - sv.edicts) +#define NUM_FOR_EDICT(e) ((int)((edict_t *)(e) - sv.edicts)) //int NUM_FOR_EDICT(edict_t *e); #define NEXT_EDICT(e) ((e) + 1)