fixing address check INSTR_STOREP_V in execloop - it kept us from writing to a vector when it was the last declared entityfield

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-11 21:17:49 +02:00
parent c31c59312b
commit 20831ddc6c

View file

@ -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;