diff --git a/src/PDB/writePDB.c b/src/PDB/writePDB.c index 960b472..427ffd9 100644 --- a/src/PDB/writePDB.c +++ b/src/PDB/writePDB.c @@ -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) @@ -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)