From e0d6582f3fa29f084686a7b3702f661ac4aaa912 Mon Sep 17 00:00:00 2001
From: David Parsons <david.parsons@inria.fr>
Date: Tue, 12 Dec 2023 18:35:45 +0100
Subject: [PATCH] fix position computation for switch

---
 src/libaevol/7/Dna_7.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/libaevol/7/Dna_7.cpp b/src/libaevol/7/Dna_7.cpp
index 5a61c005a..814713e05 100644
--- a/src/libaevol/7/Dna_7.cpp
+++ b/src/libaevol/7/Dna_7.cpp
@@ -227,7 +227,11 @@ Mutation* Dna_7::do_switch(size_type pos
 #endif
 
   // Remove promoters containing the switched base
-  ann_chrsm_->promoter_list().remove_promoters_around(pos, Utils::mod(pos + 1, length_), length_);
+  #ifdef __EUKARYOTE
+    ann_chrsm_->promoter_list().remove_promoters_around(pos, pos + 1);
+  #else
+    ann_chrsm_->promoter_list().remove_promoters_around(pos, Utils::mod(pos + 1, length_), length_);
+  #endif
 
   // Look for potential new promoters containing the switched base
   if (length() >= PROM_SIZE)
-- 
GitLab