From: amwaterhouse Date: Mon, 24 Jan 2005 17:27:36 +0000 (+0000) Subject: bug in compare fixed X-Git-Tag: Release_2_0~727 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d56c9edd1c42755347d4bea66b2feb95809f848f;p=jalview.git bug in compare fixed --- diff --git a/src/jalview/util/Comparison.java b/src/jalview/util/Comparison.java index e6aae96..becfe08 100755 --- a/src/jalview/util/Comparison.java +++ b/src/jalview/util/Comparison.java @@ -13,27 +13,17 @@ public class Comparison { String si = ii.getSequence(); String sj = jj.getSequence(); - int ilen = end-start; - int jlen = end-start; + int ilen = si.length()-1; + int jlen = sj.length()-1; - if ( jalview.util.Comparison.isGap( si.charAt(start+ilen)) ) - { + while (jalview.util.Comparison.isGap(si.charAt(start + ilen))) + { ilen--; - - while (jalview.util.Comparison.isGap( si.charAt(start+ilen))) - { - ilen--; - } } - if ( jalview.util.Comparison.isGap( sj.charAt(start+jlen)) ) + while (jalview.util.Comparison.isGap(sj.charAt(start + jlen))) { jlen--; - - while (jalview.util.Comparison.isGap( sj.charAt(start+jlen))) - { - jlen--; - } } int count = 0;