From f6e610fd42c157ae9b71e85a8958a6e8a175d102 Mon Sep 17 00:00:00 2001
From: Olivier Langella <olivier.langella@u-psud.fr>
Date: Sat, 16 Mar 2019 18:22:55 +0100
Subject: [PATCH] fix nter flanking region

---
 src/core/proteinmatch.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/proteinmatch.cpp b/src/core/proteinmatch.cpp
index c1657579f..e68973bdc 100644
--- a/src/core/proteinmatch.cpp
+++ b/src/core/proteinmatch.cpp
@@ -818,7 +818,7 @@ ProteinMatch::getFlankingNterRegion(const PeptideMatch &peptide_match,
   int start  = peptide_match.getStart() - length;
   if(start < 0)
     {
-      length = length - start;
+      length = length + start;
       start  = 0;
     }
   if(length < 0)
-- 
GitLab