Skip to content

Commit

Permalink
--sort-vars forced-QUAL/FILTER segfault fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchang committed Dec 4, 2024
1 parent bb0f4d4 commit e1744e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions 2.0/plink2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions 2.0/plink2_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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");
Expand Down

0 comments on commit e1744e0

Please sign in to comment.