Commit ebd7d99
authored
fix: map unmapped reads (tid=-1) to correct index in slow_idxstats (#511)
When iterating CRAM records, unmapped reads have tid == -1. Casting
this to usize wraps to usize::MAX, causing an index-out-of-bounds
panic. Map tid == -1 to the designated unmapped slot at index nref.1 parent 0168666 commit ebd7d99
4 files changed
Lines changed: 23 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
849 | 852 | | |
850 | | - | |
| 853 | + | |
851 | 854 | | |
852 | 855 | | |
853 | 856 | | |
| |||
858 | 861 | | |
859 | 862 | | |
860 | 863 | | |
861 | | - | |
| 864 | + | |
862 | 865 | | |
863 | 866 | | |
864 | 867 | | |
| |||
1029 | 1032 | | |
1030 | 1033 | | |
1031 | 1034 | | |
1032 | | - | |
1033 | | - | |
| 1035 | + | |
| 1036 | + | |
1034 | 1037 | | |
1035 | 1038 | | |
1036 | 1039 | | |
| |||
3166 | 3169 | | |
3167 | 3170 | | |
3168 | 3171 | | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
3169 | 3186 | | |
3170 | 3187 | | |
3171 | 3188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
| 319 | + | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
Binary file not shown.
Binary file not shown.
0 commit comments