Commit c087122
committed
fix: handle output-only type scripts in native-simulator
When a type script only appears on outputs (e.g., genesis transactions),
input_indices is empty. This caused an index-out-of-bounds panic when
trying to access input_indices[0].
This fix checks if input_indices is empty and falls back to using
output_indices[0] with is_output set to true, which correctly handles
genesis/creation scenarios for type scripts.1 parent 4e986b9 commit c087122
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
607 | 617 | | |
608 | | - | |
| 618 | + | |
609 | 619 | | |
610 | | - | |
| 620 | + | |
| 621 | + | |
611 | 622 | | |
612 | 623 | | |
613 | 624 | | |
| |||
0 commit comments