1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-09 06:29:38 +00:00

Add explicit check for CPU_UNKNOWN to avoid SIGSEGV

git-svn-id: svn://svn.cc65.org/cc65/trunk@3652 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2005-11-20 13:09:41 +00:00
parent a63e74f691
commit 33b874c4c8

View File

@ -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 {