Skip to content

Commit 8ea368e

Browse files
committed
Fix: Do not reverste removed_scripts
1 parent ebbbaf4 commit 8ea368e

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
@@ -193,7 +193,7 @@ impl Chunker {
193193
}
194194
}
195195

196-
self.call_stack.extend(removed_scripts.into_iter().rev());
196+
self.call_stack.extend(removed_scripts);
197197
assert!(num_unclosed_ifs >= 0, "More OP_ENDIF's than OP_IF's after undo step. (This means there is a bug in the undo logic.)");
198198
assert_eq!(num_unclosed_ifs, 0, "Unable to make up for the OP_IF's in this chunk. Consider a larger target size or more tolerance. Unclosed OP_IF's: {:?}, removed_len: {}, undo.call_stack: {:?}, chunks: {:?}", num_unclosed_ifs, removed_len, undo_info.call_stack, self.chunks.iter().map(|chunk| chunk.size).collect::<Vec<_>>());
199199
(undo_info.call_stack, removed_len)

0 commit comments

Comments
 (0)