Skip to content

Commit fe1a5ef

Browse files
authored
Issue-322: Fix segfault with dumptext when writing out adapter (#323)
* Issue-322: Fix segfault with dumptext when writing out adapter, but no adapter present Resolves #322 * Fix warning * Update readme
1 parent 8018b81 commit fe1a5ef

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ Quick Start
66
[![Coverity_status][covstatus]][covhome]
77

88
The Illumina InterOp libraries are a set of common routines used for reading InterOp metric files produced by
9-
Illumina sequencers including **NextSeq 1k/2k**. These libraries are backwards compatible and capable of supporting prior releases of the software,
9+
Illumina sequencers including **NextSeq 1k/2k** and NovaSeqX. These libraries are backwards compatible and capable of supporting prior releases of the software,
1010
with one exception: GA systems have been excluded.
1111

1212
***
1313
> We now support an interface to Python 2.7 (UCS-4) and 3.6-3.10
14-
> Note that 3.10 is CentOS 7 or later while ealier versions support Centos 5 or later
14+
> Note that 3.10 is CentOS 7 or later while earlier versions support Centos 5 or later
15+
> Note: dumptext has been deprecated in favor of imaging_table and will be removed in the next version
1516
***
1617

1718
The InterOp files supported by this library include:

docs/src/changes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changes {#changes}
22

3+
## v1.2.4
4+
5+
| Date | Description |
6+
|------------|----------------------------------------------------------------------------------------|
7+
| 2023-05-12 | Issue-322: Fix segfault with dumptext when writing out adapter, but no adapter present |
8+
39
## v1.2.3
410

511
| Date | Description |

src/interop/model/metrics/error_metric.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,14 +602,17 @@ namespace illumina{ namespace interop{ namespace io
602602
*/
603603
static size_t write_metric(std::ostream& out,
604604
const error_metric& metric,
605-
const header_type& header,
605+
const header_type& /*header*/,
606606
const char sep,
607607
const char eol,
608608
const char)
609609
{
610610
out << metric.lane() << sep << metric.tile() << sep << metric.cycle() << sep;
611-
out << metric.error_rate() << sep << metric.phix_adapter_rates()[0];
612-
for(size_t i=1;i<static_cast<size_t>(header.number_adapters());++i)
611+
if(metric.phix_adapter_rates().size() > 0)
612+
out << metric.error_rate() << sep << metric.phix_adapter_rates()[0];
613+
else
614+
out << metric.error_rate();
615+
for(size_t i=1;i<static_cast<size_t>(metric.phix_adapter_rates().size());++i)
613616
out << sep << metric.phix_adapter_rates()[i];
614617
out << eol;
615618
return 0;

0 commit comments

Comments
 (0)