Fix issue with throwing uncaught errors.

This commit is contained in:
Calvin Rose 2017-02-26 22:23:08 -05:00
parent 33d09f98b1
commit 08319e62cb
1 changed files with 3 additions and 1 deletions

4
vm.c
View File

@ -56,8 +56,10 @@ int gst_start(Gst *vm) {
frame.size * sizeof(GstValue));
}
stack -= frame.prevSize + GST_FRAME_SIZE;
if (stack <= thread.data)
if (stack <= thread.data) {
thread.count = 0;
break;
}
frame = *((GstStackFrame *)(stack - GST_FRAME_SIZE));
}
if (thread.count < GST_FRAME_SIZE)