From 33b874c4c8b4e0590a27d3d03aac07bc3c2314e7 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 20 Nov 2005 13:09:41 +0000 Subject: [PATCH] Add explicit check for CPU_UNKNOWN to avoid SIGSEGV git-svn-id: svn://svn.cc65.org/cc65/trunk@3652 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/instr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ca65/instr.c b/src/ca65/instr.c index 1603dcd9f..bebc0ae9b 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -1427,7 +1427,7 @@ void SetCPU (cpu_t NewCPU) CHECK (NewCPU < CPU_COUNT); /* Check if we have support for the new CPU, if so, use it */ - if (InsTabs[NewCPU]) { + if (NewCPU != CPU_UNKNOWN && InsTabs[NewCPU]) { CPU = NewCPU; InsTab = InsTabs[CPU]; } else { -- 2.39.5