]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - pr_execprogram.h
fix polygon distance checks (the radius comparison was completely wrong)
[xonotic/darkplaces.git] / pr_execprogram.h
index f41a4c5919debca869768404812df366c2133701..be8468bcfccbde1adc3f10a2ad396e71ab92faa8 100644 (file)
                        case OP_ADDRESS:
                                pr_xstatement = st - pr_statements;
 #if PRBOUNDSCHECK
-                               if ((unsigned int)OPB->_int >= progs->entityfields)
+                               if ((unsigned int)(OPB->_int) >= (unsigned int)(progs->entityfields))
                                {
                                        Host_Error("Progs attempted to address an invalid field (%i) in an edict\n", OPB->_int);
                                        return;
                        case OP_LOAD_FNC:
                                pr_xstatement = st - pr_statements;
 #if PRBOUNDSCHECK
-                               if ((unsigned int)OPB->_int >= progs->entityfields)
+                               if ((unsigned int)(OPB->_int) >= (unsigned int)(progs->entityfields))
                                {
                                        Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int);
                                        return;