From: cuz Date: Sun, 20 Nov 2005 13:09:41 +0000 (+0000) Subject: Add explicit check for CPU_UNKNOWN to avoid SIGSEGV X-Git-Tag: V2.12.0~198 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=33b874c4c8b4e0590a27d3d03aac07bc3c2314e7;p=cc65 Add explicit check for CPU_UNKNOWN to avoid SIGSEGV git-svn-id: svn://svn.cc65.org/cc65/trunk@3652 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- 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 {