From: Wolfgang Bumiller Date: Sun, 13 Jan 2013 20:03:40 +0000 (+0100) Subject: fixing a possible segfault in OP_LOAD_V X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=54afbfa8e373bb7e5806efb13cf5073acab85720;p=xonotic%2Fdarkplaces.git fixing a possible segfault in OP_LOAD_V --- diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 39f2cacb..393a7826 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -256,9 +256,10 @@ goto cleanup; } ed = PRVM_PROG_TO_EDICT(OPA->edict); - OPC->ivector[0] = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->ivector[0]; - OPC->ivector[1] = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->ivector[1]; - OPC->ivector[2] = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->ivector[2]; + ptr = ((prvm_eval_t *)(ed->fields.ip + OPB->_int)); + OPC->ivector[0] = ptr->ivector[0]; + OPC->ivector[1] = ptr->ivector[1]; + OPC->ivector[2] = ptr->ivector[2]; break; //==================