diff --git a/src/multipass.f90 b/src/multipass.f90 index 570c39c..45c069a 100644 --- a/src/multipass.f90 +++ b/src/multipass.f90 @@ -149,8 +149,9 @@ contains iwait = iroff(:,i) ! copy ray status for current beam from global ray status if(all(iwait)) then ! no rays active => stop beam iboff = .true. - else if(.not.all(.not.iwait)) then ! only some rays active - write (msg,'(" beam ",g0,": some rays are active!")') i + else if (any(iwait)) then + ! only some rays active + write (msg,'(" beam ",g0,": only some rays are active!")') i call log_warning(msg, mod='multipass', proc='initbeam') end if