Skip to content

Commit

Permalink
Removed old-style null reference. Code now compiles for C and for C++
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachele committed Mar 18, 2024
1 parent 6d0cd8c commit e322805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PDB/writePDB.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ strcat(line," ");
/*
pdb_a[2].b[1].c[7] = 1; chainID (22)
*/
if((a[0].cID!='\0')&&(a[0].cID!=NULL)){strncat(line,a[0].cID,1);}
else if((r[0].cID!='\0')&&(a[0].cID!=NULL)){strncat(line,r[0].cID,1);}
if(a[0].cID!=NULL){strncat(line,a[0].cID,1);}
else if(a[0].cID!=NULL){strncat(line,r[0].cID,1);}
else{strcat(line," ");}
/*
pdb_a[2].b[1].c[8] = 4; resSeq (23-26)
Expand All @@ -429,7 +429,7 @@ strcat(line,tmp);
/*
pdb_a[2].b[1].c[9] = 1; iCode (27)
*/
if(r[0].IC=='\0'){strcat(line," ");}
if(r[0].IC==NULL){strcat(line," ");}
else{strncat(line,r[0].IC,1);}
/*
pdb_a[2].b[1].c[10] = 3; N/A (28-30)
Expand Down

0 comments on commit e322805

Please sign in to comment.