fixed a bug where the Opcode jump table was written to out of bounds
[cyclone68000.git] / Cyclone / OpAny.cpp
index 4af08b2..92e695e 100644 (file)
@@ -1,6 +1,8 @@
 \r
 // This file is part of the Cyclone 68000 Emulator\r
 \r
+// Copyright (c) 2011 FinalDave (emudave (at) gmail.com)\r
+\r
 // This code is licensed under the GNU General Public License version 2.0 and the MAME License.\r
 // You can choose the license that has the most advantages for you.\r
 \r
@@ -19,7 +21,9 @@ static unsigned short CPU_CALL OpRead16(unsigned int a)
 void OpUse(int op,int use)\r
 {\r
   char text[64]="";\r
-  CyJump[op]=use;\r
+  \r
+  if (op>=0)\r
+         CyJump[op]=use;\r
 \r
   if (op!=use) return;\r
 \r