From e1744e03a55945748f16c969f40471ce4a00c216 Mon Sep 17 00:00:00 2001 From: Christopher Chang Date: Tue, 3 Dec 2024 20:13:14 -0500 Subject: [PATCH] --sort-vars forced-QUAL/FILTER segfault fix --- 2.0/plink2.cc | 6 +++--- 2.0/plink2_data.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/2.0/plink2.cc b/2.0/plink2.cc index a929626e..e11f420c 100644 --- a/2.0/plink2.cc +++ b/2.0/plink2.cc @@ -44,7 +44,7 @@ namespace plink2 { #endif -static const char ver_str[] = "PLINK v2.0.0-a.5.19" +static const char ver_str[] = "PLINK v2.0.0-a.5.20" #ifdef NOLAPACK "NL" #elif defined(LAPACK_ILP64) @@ -72,10 +72,10 @@ static const char ver_str[] = "PLINK v2.0.0-a.5.19" #elif defined(USE_AOCL) " AMD" #endif - " (24 Nov 2024)"; + " (3 Dec 2024)"; static const char ver_str2[] = // include leading space if day < 10, so character length stays the same - "" + " " #ifdef NOLAPACK #elif defined(LAPACK_ILP64) diff --git a/2.0/plink2_data.cc b/2.0/plink2_data.cc index 2dc4ea92..b14af8de 100644 --- a/2.0/plink2_data.cc +++ b/2.0/plink2_data.cc @@ -8264,7 +8264,7 @@ PglErr WritePvarResortedInterval(const ChrInfo* write_cip, const uint32_t* varia if (write_qual) { *cswritep++ = '\t'; - if (!IsSet(qual_present, variant_uidx)) { + if ((!qual_present) || (!IsSet(qual_present, variant_uidx))) { *cswritep++ = '.'; } else { cswritep = ftoa_g(quals[variant_uidx], cswritep); @@ -8273,7 +8273,7 @@ PglErr WritePvarResortedInterval(const ChrInfo* write_cip, const uint32_t* varia if (write_filter) { *cswritep++ = '\t'; - if (!IsSet(filter_present, variant_uidx)) { + if ((!filter_present) || (!IsSet(filter_present, variant_uidx))) { *cswritep++ = '.'; } else if (!IsSet(filter_npass, variant_uidx)) { cswritep = strcpya_k(cswritep, "PASS");