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:
@@ -1427,7 +1427,7 @@ void SetCPU (cpu_t NewCPU)
|
|||||||
CHECK (NewCPU < CPU_COUNT);
|
CHECK (NewCPU < CPU_COUNT);
|
||||||
|
|
||||||
/* Check if we have support for the new CPU, if so, use it */
|
/* Check if we have support for the new CPU, if so, use it */
|
||||||
if (InsTabs[NewCPU]) {
|
if (NewCPU != CPU_UNKNOWN && InsTabs[NewCPU]) {
|
||||||
CPU = NewCPU;
|
CPU = NewCPU;
|
||||||
InsTab = InsTabs[CPU];
|
InsTab = InsTabs[CPU];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user