From 7e66608b3684494613689efd87800f2c3c771fde Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 26 Apr 2020 04:24:22 +0000 Subject: [PATCH] Fix stupid buggy flawed bounds check. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5682 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/execloop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/qclib/execloop.h b/engine/qclib/execloop.h index a82573eb9..f83534c05 100644 --- a/engine/qclib/execloop.h +++ b/engine/qclib/execloop.h @@ -32,7 +32,7 @@ #define ENGINEPOINTER(p) ((char*)(p) - progfuncs->funcs.stringtable) #define QCPOINTER(p) (eval_t *)(p->_int+progfuncs->funcs.stringtable) #define QCPOINTERM(p) (eval_t *)((p)+progfuncs->funcs.stringtable) -#define QCPOINTERWRITEFAIL(p,sz) ((float)(p)-1 >= prinst.addressableused-1-(sz)) //disallows null writes +#define QCPOINTERWRITEFAIL(p,sz) ((unsigned int)(p)-1 >= prinst.addressableused-1-(sz)) //disallows null writes #define QCPOINTERREADFAIL(p,sz) ((unsigned int)(p) >= prinst.addressableused-(sz)) //permits null reads