watch end of sequence when asking for (start, end)
authoramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 18:12:50 +0000 (18:12 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 10 Feb 2005 18:12:50 +0000 (18:12 +0000)
src/jalview/datamodel/Sequence.java

index eceddf1..cf578c0 100755 (executable)
@@ -139,6 +139,8 @@ public class Sequence implements SequenceI
     return this.sequence;\r
   }\r
   public String getSequence(int start,int end) {\r
+    if(end>=sequence.length())\r
+      end = sequence.length()-1;\r
     return this.sequence.substring(start,end);\r
   }\r
 \r