diff --git a/engine/common/vm.h b/engine/common/vm.h index f12c25c45..b10ca7bf6 100644 --- a/engine/common/vm.h +++ b/engine/common/vm.h @@ -12,6 +12,7 @@ //its optional... but if its not in there then its unlikely you'll actually be able to get the engine to a stage where it *can* load anything #include #define qintptr_t intptr_t + #define quintptr_t uintptr_t #else #if defined(_WIN64) #define qintptr_t __int64 @@ -24,10 +25,11 @@ #define qintptr_t long #endif #endif + #define quintptr_t unsigned qintptr_t #endif typedef qintptr_t (EXPORT_FN *sys_calldll_t) (qintptr_t arg, ...); -typedef int (*sys_callqvm_t) (void *offset, unsigned qintptr_t mask, int fn, const int *arg); +typedef int (*sys_callqvm_t) (void *offset, quintptr_t mask, int fn, const int *arg); typedef struct vm_s vm_t; diff --git a/engine/server/pr_q1qvm.c b/engine/server/pr_q1qvm.c index 31d60ff0d..4fb6d8dbf 100755 --- a/engine/server/pr_q1qvm.c +++ b/engine/server/pr_q1qvm.c @@ -518,7 +518,7 @@ void PF_precache_model_Internal (progfuncs_t *prinst, char *s); void PF_setmodel_Internal (progfuncs_t *prinst, edict_t *e, char *m); char *PF_infokey_Internal (int entnum, char *value);; -static int WrapQCBuiltin(builtin_t func, void *offset, unsigned qintptr_t mask, const qintptr_t *arg, char *argtypes) +static int WrapQCBuiltin(builtin_t func, void *offset, quintptr_t mask, const qintptr_t *arg, char *argtypes) { globalvars_t gv; int argnum=0; @@ -554,7 +554,7 @@ static int WrapQCBuiltin(builtin_t func, void *offset, unsigned qintptr_t mask, } #define VALIDATEPOINTER(o,l) if ((qintptr_t)o + l >= mask || VM_POINTER(o) < offset) SV_Error("Call to game trap %i passes invalid pointer\n", fn); //out of bounds. -static qintptr_t syscallhandle (void *offset, unsigned qintptr_t mask, qintptr_t fn, const qintptr_t *arg) +static qintptr_t syscallhandle (void *offset, quintptr_t mask, qintptr_t fn, const qintptr_t *arg) { switch (fn) { @@ -1259,7 +1259,7 @@ Con_DPrintf("PF_readcmd: %s\n%s", s, output); } #if __WORDSIZE == 64 -static int syscallqvm (void *offset, unsigned qintptr_t mask, int fn, const int *arg) +static int syscallqvm (void *offset, quintptr_t mask, int fn, const int *arg) { qintptr_t args[13]; int i;