From: Jim Procter Date: Fri, 21 Feb 2014 16:27:50 +0000 (+0000) Subject: patch for JAL-1449 - continuance of JAL-1364 - check bounds of gapMap - not the VIENN... X-Git-Tag: Jalview_2_9~204^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b920a3c8476e5f43399393d580d4e3d8b79c15b6;p=jalview.git patch for JAL-1449 - continuance of JAL-1364 - check bounds of gapMap - not the VIENNA results --- diff --git a/src/jalview/ws/jws2/RNAalifoldClient.java b/src/jalview/ws/jws2/RNAalifoldClient.java index ec40552..c7d8efd 100644 --- a/src/jalview/ws/jws2/RNAalifoldClient.java +++ b/src/jalview/ws/jws2/RNAalifoldClient.java @@ -198,7 +198,7 @@ public class RNAalifoldClient extends JabawsAlignCalcWorker implements private AlignmentAnnotation constructAnnotationFromScoreHolder( AlignmentAnnotation annotation, String struct, TreeSet data) { - Annotation[] anns = new Annotation[struct.length()]; + Annotation[] anns = new Annotation[gapMap!= null ? gapMap.length+1 : struct.length()]; if (data != null && data.size() > 1 @@ -261,10 +261,14 @@ public class RNAalifoldClient extends JabawsAlignCalcWorker implements if (gapMap!=null) { // skip any gapped columns in the input data - while (!gapMap[ri]) + while (!gapMap[ri] && ri