Skip to content

Instantly share code, notes, and snippets.

@FROGGS

FROGGS/mad.diff Secret

Created April 28, 2014 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/05dfddbd81f2bab1a3fe to your computer and use it in GitHub Desktop.
Save FROGGS/05dfddbd81f2bab1a3fe to your computer and use it in GitHub Desktop.
diff --git a/src/mast/compiler.c b/src/mast/compiler.c
index a8f2609..cbff484 100644
--- a/src/mast/compiler.c
+++ b/src/mast/compiler.c
@@ -829,7 +829,8 @@ void compile_instruction(VM, WriterState *ws, MASTNode *node) {
ws->cur_frame->handlers[i].end_offset = end;
ws->cur_frame->handlers[i].category_mask = (unsigned int)hs->category_mask;
ws->cur_frame->handlers[i].action = (unsigned short)hs->action;
- ws->cur_frame->handlers[i].block_label = hs->block_label;
+ if (ws->cur_frame->handlers[i].category_mask & MVM_EX_CAT_LABELED)
+ ws->cur_frame->handlers[i].block_label = hs->block_label;
/* Ensure we have a label. */
if (ISTYPE(vm, hs->goto_label, ws->types->Label)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment