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

Commit

Permalink
Removed unnecessary check for size of plidx and tpidx, as they cause …
Browse files Browse the repository at this point in the history
…a segfault when not present
  • Loading branch information
daminton committed Aug 10, 2021
1 parent 07a458f commit 156fa2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/symba/symba_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module subroutine symba_io_dump_particle_info(system, param, lincludecb, tpidx,
end if
end if

if (present(plidx) .and. (system%pl%nbody > 0) .and. size(plidx) > 0) then
if (present(plidx) .and. (system%pl%nbody > 0)) then
select type(pl => system%pl)
class is (symba_pl)
do i = 1, size(plidx)
Expand All @@ -65,7 +65,7 @@ module subroutine symba_io_dump_particle_info(system, param, lincludecb, tpidx,
end select
end if

if (present(tpidx) .and. (system%tp%nbody > 0) .and. size(tpidx) > 0) then
if (present(tpidx) .and. (system%tp%nbody > 0)) then
select type(tp => system%tp)
class is (symba_tp)
do i = 1, size(tpidx)
Expand Down

0 comments on commit 156fa2f

Please sign in to comment.