aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2012-04-25 11:51:08 +0000
committerDimitri Sokolyuk <demon@dim13.org>2012-04-25 11:51:08 +0000
commit39e3abd224543f1ef4f0f29e30807b8d26ed3b62 (patch)
treeccb5a0218a4e866b03544c65a2e1bd29372926ef
parentc1be006a577a45153c5da42c9a511fc4d8992967 (diff)
add unkonwn opcode protection
-rw-r--r--emu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/emu.c b/emu.c
index 5920ff7..1d363ca 100644
--- a/emu.c
+++ b/emu.c
@@ -75,7 +75,8 @@ void (*extop[nExt])(unsigned short *a) = {
void
ext(unsigned short *a, unsigned short *b)
{
- extop[*a](b);
+ if (*a < nExt)
+ extop[*a](b);
}
void