From: Wolfgang Bumiller Date: Tue, 1 May 2012 10:14:07 +0000 (+0200) Subject: Check for TYPE_FIELD in load_from_ent X-Git-Tag: 0.1-rc1~539 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ddbd460331196e8b043e55b6c21389d60c947a8f;p=xonotic%2Fgmqcc.git Check for TYPE_FIELD in load_from_ent --- diff --git a/ir.c b/ir.c index 2d5977a..720efc9 100644 --- a/ir.c +++ b/ir.c @@ -964,6 +964,10 @@ ir_value* ir_block_create_load_from_ent(ir_block *self, const char *label, ir_va if (ent->vtype != TYPE_ENTITY) return NULL; + /* at some point we could redirect for TYPE_POINTER... but that could lead to carelessness */ + if (field->vtype != TYPE_FIELD) + return NULL; + switch (outype) { case TYPE_FLOAT: op = INSTR_LOAD_F; break;