From 30b0abe359c3b21859f18ad6f2e3eddb917099aa Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 29 Nov 2010 16:09:52 +0200 Subject: [PATCH] orcprog-c: don't deref NULL rule Continue with next instruction if rule is NULL. Remove setting compiler->error=TRUE twice, the macro does that already. --- orc/orcprogram-c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orc/orcprogram-c.c b/orc/orcprogram-c.c index 50fedef..4ef9f1f 100644 --- a/orc/orcprogram-c.c +++ b/orc/orcprogram-c.c @@ -318,7 +318,7 @@ orc_compiler_c_assemble (OrcCompiler *compiler) if (!rule) { ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", opcode->name, compiler->target->name); - compiler->error = TRUE; + continue; } ORC_ASM_CODE(compiler,"%*s", prefix, ""); if (insn->flags & (ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4)) { @@ -356,7 +356,7 @@ orc_compiler_c_assemble (OrcCompiler *compiler) if (!rule) { ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", opcode->name, compiler->target->name); - compiler->error = TRUE; + continue; } if (insn->flags & (ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4)) { -- 2.7.4