mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 02:30:44 +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:
parent
a63e74f691
commit
33b874c4c8
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user