summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bbb9c29)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11938
d7cf8633-e32d-0410-b094-
e92efae38249
case OP_STOREP_FLD: // integers
case OP_STOREP_S:
case OP_STOREP_FNC: // pointers
case OP_STOREP_FLD: // integers
case OP_STOREP_S:
case OP_STOREP_FNC: // pointers
- if (OPB->_int < 0 || OPB->_int + 1 > prog->entityfieldsarea)
+ if ((unsigned int)OPB->_int >= (unsigned int)prog->entityfieldsarea)
{
PreError();
prog->error_cmd("%s attempted to write to an out of bounds edict (%i)", prog->name, (int)OPB->_int);
{
PreError();
prog->error_cmd("%s attempted to write to an out of bounds edict (%i)", prog->name, (int)OPB->_int);
- if (OPA->edict < 0 || OPA->edict >= prog->max_edicts)
+ if ((unsigned int)OPA->edict >= (unsigned int)prog->max_edicts)
{
PreError();
prog->error_cmd("%s Progs attempted to address an out of bounds edict number", prog->name);
{
PreError();
prog->error_cmd("%s Progs attempted to address an out of bounds edict number", prog->name);
case OP_LOAD_ENT:
case OP_LOAD_S:
case OP_LOAD_FNC:
case OP_LOAD_ENT:
case OP_LOAD_S:
case OP_LOAD_FNC:
- if (OPA->edict < 0 || OPA->edict >= prog->max_edicts)
+ if ((unsigned int)OPA->edict >= (unsigned int)prog->max_edicts)
{
PreError();
prog->error_cmd("%s Progs attempted to read an out of bounds edict number", prog->name);
{
PreError();
prog->error_cmd("%s Progs attempted to read an out of bounds edict number", prog->name);
- if (OPA->edict < 0 || OPA->edict >= prog->max_edicts)
+ if ((unsigned int)OPA->edict >= (unsigned int)prog->max_edicts)
{
PreError();
prog->error_cmd("%s Progs attempted to read an out of bounds edict number", prog->name);
{
PreError();
prog->error_cmd("%s Progs attempted to read an out of bounds edict number", prog->name);