From: amwaterhouse Date: Thu, 10 Feb 2005 18:12:50 +0000 (+0000) Subject: watch end of sequence when asking for (start, end) X-Git-Tag: Release_2_0~670 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8fd0b8182a10ed77b078160fffccca67f7ecb118;p=jalview.git watch end of sequence when asking for (start, end) --- 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); }