Permalink
Browse files

Fix the handling of the m[PC]==-1 case.

  • Loading branch information...
pikhq committed Mar 24, 2012
1 parent ffc579f commit 56f9de9b631b7d669d953d8c4f3a67f07243af9d
Showing with 3 additions and 2 deletions.
  1. +3 −2 mako.c
View
5 mako.c
@@ -159,6 +159,9 @@ static void sync() {
static void tick() {
+ if(m[PC] == -1)
+ exit(0);
+
int32_t o = m[m[PC]++];
int32_t a, b;
@@ -270,8 +273,6 @@ static void tick() {
case OP_SYNC:
sync();
break;
- case -1:
- exit(0);
}
}

0 comments on commit 56f9de9

Please sign in to comment.