From 08319e62cb26dc1649928b092afb2b23f234a0a1 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 26 Feb 2017 22:23:08 -0500 Subject: [PATCH] Fix issue with throwing uncaught errors. --- vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm.c b/vm.c index 7588ebc2..3adb3925 100644 --- a/vm.c +++ b/vm.c @@ -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)