From beaa6f26f1deef967d8be92959d4592d0623066d Mon Sep 17 00:00:00 2001
From: Jean-Marco Alameddine <jean-marco.alameddine@tu-dortmund.de>
Date: Tue, 2 May 2023 16:58:32 +0200
Subject: [PATCH] Add same treatment to selectDecay as in selectInteraction
 (see commit a9620174f5938478ee4a18c58810a9f4dec760ec)

---
 corsika/detail/framework/process/ProcessSequence.inl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/corsika/detail/framework/process/ProcessSequence.inl b/corsika/detail/framework/process/ProcessSequence.inl
index 596c8ca90..960f65bb1 100644
--- a/corsika/detail/framework/process/ProcessSequence.inl
+++ b/corsika/detail/framework/process/ProcessSequence.inl
@@ -678,7 +678,7 @@ namespace corsika {
         // if this is not a ContinuousProcess --> evaluate probability
         decay_inv_sum += A_.getInverseLifetime(view.parent());
         // check if we should execute THIS process and then EXIT
-        if (decay_inv_select <= decay_inv_sum) { // more pedagogical: rndm_select <
+        if (decay_inv_select < decay_inv_sum) { // more pedagogical: rndm_select <
                                                  // decay_inv_sum / decay_inv_tot
           // interface checking on TProcess1
           static_assert(has_method_doDecay_v<TProcess1, void, TSecondaryView&>,
@@ -701,7 +701,7 @@ namespace corsika {
         // if this is not a ContinuousProcess --> evaluate probability
         decay_inv_sum += B_.getInverseLifetime(view.parent());
         // check if we should execute THIS process and then EXIT
-        if (decay_inv_select <= decay_inv_sum) {
+        if (decay_inv_select < decay_inv_sum) {
 
           // interface checking on TProcess1
           static_assert(has_method_doDecay_v<TProcess2, void, TSecondaryView&>,
-- 
GitLab