From: jprocter Date: Sun, 27 Feb 2011 17:13:47 +0000 (+0000) Subject: first patch for JAL-774 - ensure end is a valid bound to limit search for last sequen... X-Git-Tag: Release_2_7~234 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8a92c2fed93b2adfac07a8bc29d3556ee7b1be62;p=jalview.git first patch for JAL-774 - ensure end is a valid bound to limit search for last sequence position (at least as long as sequence) --- diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 13f928c..22929f5 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -116,7 +116,7 @@ public class Sequence implements SequenceI void checkValidRange() { - if (end < 1) + // Note: JAL-774 : http://issues.jalview.org/browse/JAL-774?focusedCommentId=11239&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-11239 { int endRes = 0; for (int j = 0; j < sequence.length; j++) @@ -131,7 +131,9 @@ public class Sequence implements SequenceI endRes += start - 1; } - this.end = endRes; + if (end