orcprog-c: don't deref NULL rule
authorStefan Kost <ensonic@users.sf.net>
Mon, 29 Nov 2010 14:09:52 +0000 (16:09 +0200)
committerDavid Schleef <ds@schleef.org>
Sun, 5 Dec 2010 22:25:07 +0000 (14:25 -0800)
Continue with next instruction if rule is NULL. Remove setting
compiler->error=TRUE twice, the macro does that already.

orc/orcprogram-c.c

index 50fedef..4ef9f1f 100644 (file)
@@ -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)) {