Skip to content

Commit

Permalink
Fix neighbor lists reading
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
  • Loading branch information
rafaelravedutti committed Aug 11, 2021
1 parent a51d0ee commit ee7b7bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main-md-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ int main (int argc, char** argv) {
while(line[i] == ' ') { i++; }
char *neigh_idx = strtok(&line[i], " ");

while(neigh_idx != NULL) {
while(neigh_idx != NULL && *neigh_idx != '\n') {
int j = numneighs[atom];
neighborlists[atom * maxneighs + j] = atoi(neigh_idx);
numneighs[atom]++;
Expand Down

0 comments on commit ee7b7bd

Please sign in to comment.