]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixing a possible segfault in OP_LOAD_V
authorWolfgang Bumiller <blub@speed.at>
Sun, 13 Jan 2013 20:03:40 +0000 (21:03 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sun, 13 Jan 2013 20:03:40 +0000 (21:03 +0100)
prvm_execprogram.h

index 39f2cacb74d6b61edf99f490bc49e273c611715e..393a782669c037ac3783838f57ba1ccacd644b69 100644 (file)
                                        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;
 
                //==================