This repository was archived by the owner on Apr 11, 2025. It is now read-only.
Commit ae891d8
committed
boundaries to split lines Fix index out of range
1. **Empty List Check**:
- At the start of the function, I added a condition to check if the `boundaries` list is empty. If it is, the function returns an empty list, preventing any further operations that would lead to index errors.
2. **Minimum Length Check**:
- Although not strictly necessary after the empty check, I added a check to ensure that there is at least one tuple in the `boundaries`. This is more of a safeguard, as the first check already handles the empty case.1 parent 20f578d commit ae891d8
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
794 | 802 | | |
795 | 803 | | |
796 | 804 | | |
| |||
799 | 807 | | |
800 | 808 | | |
801 | 809 | | |
| 810 | + | |
| 811 | + | |
802 | 812 | | |
| 813 | + | |
| 814 | + | |
803 | 815 | | |
| 816 | + | |
804 | 817 | | |
805 | 818 | | |
806 | 819 | | |
| |||
0 commit comments