Skip to content

Commit

Permalink
keep the original strncpy length
Browse files Browse the repository at this point in the history
  • Loading branch information
Coos Baakman committed Feb 24, 2020
1 parent d5ac71e commit 2bf069d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hssp-nt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ struct MResInfo
int64 m_pdb_nr;
std::string m_ins_code;
MSecondaryStructure m_ss;
char m_structure[9];
char m_structure[10];
char m_aa;
int64 m_beta_partner_1,
m_beta_partner_2,
Expand Down Expand Up @@ -457,7 +457,7 @@ MProfile::MProfile(const MChain& inChain, const sequence& inSequence,
(*ri)->GetSeqNumber(), (*ri)->GetInsertionCode(), (*ri)->GetSecondaryStructure()
};
res.m_aa = kResidueInfo[(*ri)->GetType()].code;
strncpy(res.m_structure, GetStructureString(*(*ri)).c_str(), 8);
strncpy(res.m_structure, GetStructureString(*(*ri)).c_str(), 9);
res.m_beta_partner_1 = ((*ri)->GetBetaPartner(0).residue != nullptr)? (*ri)->GetBetaPartner(0).residue->GetNumber() : 0;
res.m_beta_partner_2 = ((*ri)->GetBetaPartner(1).residue != nullptr)? (*ri)->GetBetaPartner(1).residue->GetNumber() : 0;
res.m_ss_bridge_nr = bridge_nr;
Expand Down

0 comments on commit 2bf069d

Please sign in to comment.