]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
ir: fix vector negation using the nil value graphitemaster/old-stable
authorWolfgang Bumiller <wry.git@bumiller.com>
Thu, 22 Jun 2017 06:46:48 +0000 (08:46 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Thu, 22 Jun 2017 06:46:48 +0000 (08:46 +0200)
We cannot use OFS_NULL as it is only a single value and
overlaps with OFS_RETURN.

ir.c

diff --git a/ir.c b/ir.c
index 7d83720c4d4afb3cd56ec90a08b9cc1ad7dde9d3..1aea818a85650a8eb3ac2badfbe25cbd8d239927 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -1892,7 +1892,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, NULL, operand, ot);
         case VINSTR_NEG_V:
-            return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_V, NULL, operand, ot);
+            return ir_block_create_general_instr(self, ctx, label, INSTR_SUB_V, self->owner->owner->nil, operand, ot);
 
         default:
             ot = operand->vtype;