From: Wolfgang (Blub) Bumiller <blub@speed.at>
Date: Sat, 11 Aug 2012 19:17:49 +0000 (+0200)
Subject: fixing address check INSTR_STOREP_V in execloop - it kept us from writing to a vector... 
X-Git-Tag: 0.1-rc1~349^2~6
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=20831ddc6c0839f7b85d3c717e8a8e0b3fa46838;p=xonotic%2Fgmqcc.git

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

diff --git a/execloop.h b/execloop.h
index 2929c2d..6ccfad4 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;