Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Added end of file exception handling in the particle information file…
Browse files Browse the repository at this point in the history
… reader
  • Loading branch information
daminton committed Aug 19, 2021
1 parent ecf6985 commit 061cbca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/symba/symba_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ module subroutine symba_io_read_particle(system, param)
associate(npl => pl%nbody, ntp => tp%nbody)
do
lmatch = .false.
read(LUN, err = 667, iomsg = errmsg) id
read(LUN, err = 667, iomsg = errmsg, end = 333) id

if (idx == cb%id) then
read(LUN, err = 667, iomsg = errmsg) cb%info
Expand Down Expand Up @@ -308,6 +308,7 @@ module subroutine symba_io_read_particle(system, param)
end select
end select

333 continue
return

667 continue
Expand Down

0 comments on commit 061cbca

Please sign in to comment.