Skip to content

Commit cd0d7b9

Browse files
committed
Don't assing an instruction number twice
1 parent 8546b4b commit cd0d7b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/lib/unlang/compile.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,12 @@ static unlang_t *compile_item(unlang_t *parent, unlang_compile_ctx_t *unlang_ctx
21552155
if (!c) return NULL;
21562156
if (c == UNLANG_IGNORE) return UNLANG_IGNORE;
21572157

2158+
/*
2159+
* Some compilation paths already go through this path
2160+
* and will have assigned a number.
2161+
*/
2162+
if (c->number) return c;
2163+
21582164
c->number = unlang_number++;
21592165
compile_set_default_actions(c, unlang_ctx);
21602166

0 commit comments

Comments
 (0)