X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=execloop.h;h=b75061e50b4633637e8d068c3c8a08305b7798e3;hb=060bddb922c7933f1970828b7fcf3e3a4122d5c8;hp=2929c2d6a501d51d7a6f7246ee86540ab99cefd6;hpb=cf04b5ed01d7f90329c36b87d8b2bf7d170ad7b3;p=xonotic%2Fgmqcc.git diff --git a/execloop.h b/execloop.h index 2929c2d..b75061e 100644 --- a/execloop.h +++ b/execloop.h @@ -216,7 +216,7 @@ ptr->_int = OPA->_int; break; case INSTR_STOREP_V: - if (OPB->_int < 0 || OPB->_int + 3 >= prog->entitydata_count) + if (OPB->_int < 0 || OPB->_int + 2 >= prog->entitydata_count) { PRVM_ERROR("%s attempted to write to an out of bounds edict (%i)", PRVM_NAME, OPB->_int); goto cleanup; @@ -271,7 +271,7 @@ PRVM_ERROR ("%s Progs attempted to read an out of bounds edict number", PRVM_NAME); goto cleanup; } - if (OPB->_int < 0 || OPB->_int + 3 >= prog->entityfields) + if (OPB->_int < 0 || OPB->_int + 3 > prog->entityfields) { PRVM_ERROR("%s attempted to read an invalid field in an edict (%i)", PRVM_NAME, OPB->_int); goto cleanup;