From 8fd0b8182a10ed77b078160fffccca67f7ecb118 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 10 Feb 2005 18:12:50 +0000 Subject: [PATCH] watch end of sequence when asking for (start, end) --- src/jalview/datamodel/Sequence.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index eceddf1..cf578c0 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -139,6 +139,8 @@ public class Sequence implements SequenceI return this.sequence; } public String getSequence(int start,int end) { + if(end>=sequence.length()) + end = sequence.length()-1; return this.sequence.substring(start,end); } -- 1.7.10.2