Skip to content

Commit 50c7b00

Browse files
Merge pull request #509 from Wuerfel21/W21-fix-spin2-abort
Fix Spin2 ABORT/CATCH
2 parents c0831fb + 208827f commit 50c7b00

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

frontends/spin/spinlang.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ doSpinTransform(AST **astptr, int level, AST *parent)
560560
// and can't differentiate a normal return from an abort.
561561
if (gl_output != OUTPUT_BYTECODE /*|| gl_interp_kind == INTERP_KIND_NUCODE */ ) {
562562
AST *defaultval = IsSpin2Lang(curfunc->language) ?
563-
AstInteger(0) : ast->left;
563+
AstOperator(K_BOOL_AND,ast->left,AstInteger(0)) : ast->left;
564564
curfunc->force_locals_to_stack = 1; // if we do a catch we will want data on stack
565565
AstReportAs(ast, &saveinfo); // any newly created AST nodes should reflect debug info from this one
566566
*astptr = ast = NewAST(AST_TRYENV,

0 commit comments

Comments
 (0)