watch out for end of seq in findposition
authoramwaterhouse <Andrew Waterhouse>
Fri, 11 Feb 2005 11:04:31 +0000 (11:04 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 11 Feb 2005 11:04:31 +0000 (11:04 +0000)
src/jalview/datamodel/Sequence.java

index cf578c0..ebdff92 100755 (executable)
@@ -184,10 +184,9 @@ public class Sequence implements SequenceI
     int j   = 0;\r
     int pos = start;\r
 \r
-    while (j < i)\r
+    while (j < i && j<sequence.length())\r
     {\r
       char c = sequence.charAt(j);\r
-\r
       if (!jalview.util.Comparison.isGap((c)))\r
         pos++;\r
 \r