Skip to content

Commit b813b80

Browse files
committed
Ensure all OP_IF, NOTIF and ENDIF are seperate
1 parent 7337a26 commit b813b80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chunker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl Chunker {
143143
None => break, // the last block in the call stack
144144
};
145145
if builder.contains_flow_op() {
146-
if builder.is_script_buf() {
146+
if builder.is_script_buf() && builder.len() == 1 {
147147
num_unclosed_ifs -= builder.num_unclosed_ifs();
148148
println!("[INFO] Removing {:?}", builder.blocks);
149149
removed_len += builder.len();

0 commit comments

Comments
 (0)