From: Wolfgang Bumiller Date: Thu, 22 Jun 2017 06:44:35 +0000 (+0200) Subject: ir: fix vector negation using the nil value X-Git-Tag: xonotic-v0.8.5~39 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=3f5305af586ebd3505a870f8e599b610144e64e9 ir: fix vector negation using the nil value We cannot use OFS_NULL as it is only a single value and overlaps with OFS_RETURN. --- diff --git a/ir.cpp b/ir.cpp index 5df1244..7a2583b 100644 --- a/ir.cpp +++ b/ir.cpp @@ -1643,7 +1643,7 @@ ir_value* ir_block_create_unary(ir_block *self, lex_ctx_t ctx, case VINSTR_NEG_F: return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_F, nullptr, operand, ot); case VINSTR_NEG_V: - return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_V, nullptr, operand, TYPE_VECTOR); + return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_V, self->m_owner->m_owner->m_nil, operand, TYPE_VECTOR); default: ot = operand->m_vtype;