JAL-3092 make sure base pair counter is always moved in loop that computes the helix...
authorJim Procter <jprocter@issues.jalview.org>
Thu, 30 Aug 2018 15:31:37 +0000 (16:31 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 30 Aug 2018 15:31:49 +0000 (16:31 +0100)
src/jalview/analysis/Rna.java

index 0d39abf..e5cda93 100644 (file)
@@ -440,8 +440,8 @@ public class Rna
       /*
        * catch things like <<..<<..>>..<<..>>>> |
        */
-      int j = bps.size() - 1;
-      while (j >= 0)
+      int j = bps.size();
+      while (--j >= 0)
       {
         int popen = bps.get(j).getBP5();
 
@@ -460,7 +460,6 @@ public class Rna
             break;
           }
         }
-        j -= 1;
       }
 
       // Put positions and helix information into the hashtable