Skip to content

Commit 1dbe1e6

Browse files
Update h5mdplugin.c
1 parent 178688e commit 1dbe1e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

h5mdplugin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ int read_h5md_structure_vmd_structure(void *_file, int *optflags,molfile_atom_t
248248
strncpy(atom->type, data_type[index_of_species], 16*sizeof(char)); //set type for atom of species
249249
else
250250
strncpy(atom->type,default_type,16*sizeof(char));
251-
if(status_read_atomicnumber==0 && status_index_species==0){ //set atomicnumber
252-
if(data_atomicnumber[index_of_species]<112 && index_of_species>=0){
251+
if(status_read_atomicnumber==0 && status_index_species==0 &&index_of_species>=0){ //set atomicnumber
252+
if(data_atomicnumber[index_of_species]<112 ){
253253
atom->atomicnumber = data_atomicnumber[index_of_species];
254254
}else{
255255
atom->atomicnumber = data_atomicnumber[index_of_species]%112;

0 commit comments

Comments
 (0)