From fa62bd0444eb72e039b5a106a18385b82178eac4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 17 Sep 2014 15:28:57 +0200 Subject: compiler: avoid nagative array index For instructions that don't have a second variable, don't try to index the variable array with a -1 index. --- orc/orccompiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orc/orccompiler.c b/orc/orccompiler.c index 0086f77..bfb220f 100644 --- a/orc/orccompiler.c +++ b/orc/orccompiler.c @@ -927,7 +927,7 @@ orc_compiler_rewrite_vars2 (OrcCompiler *compiler) compiler->vars[src2].alloc = 1; } else { int src2 = compiler->insns[j].src_args[1]; - if (compiler->vars[src2].alloc == 1) { + if (src2 != -1 && compiler->vars[src2].alloc == 1) { compiler->vars[src2].alloc = 0; } } -- cgit v1.2.3