From 850612f220380ecd8d53c1b7f4132ae468ead2ea Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 5 May 2021 11:29:20 +0200 Subject: compiler: properly handle break/continue in nested scopes When emitting byte code for break or continue statements, ensure that local variables in all containing scopes up to the loop body scope are popped, not just those in the same scope the statement is located in. Signed-off-by: Jo-Philipp Wich --- compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler.h') diff --git a/compiler.h b/compiler.h index 3dcb79a..deec3d5 100644 --- a/compiler.h +++ b/compiler.h @@ -66,7 +66,7 @@ typedef enum { struct uc_patchlist { struct uc_patchlist *parent; - size_t count, *entries; + size_t depth, count, *entries; }; typedef struct uc_patchlist uc_patchlist; -- cgit v1.2.3